Skip to content

feat: Ship netcat in the flink-sql-runner image - #392

Merged
ferenc-csaky merged 1 commit into
mainfrom
feat/netcat-in-image
Sep 3, 2026
Merged

feat: Ship netcat in the flink-sql-runner image#392
ferenc-csaky merged 1 commit into
mainfrom
feat/netcat-in-image

Conversation

@velo

@velo velo commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Adds netcat-openbsd to the runner image so nc is available inside JobManager/TaskManager pods.

Why

Debugging a Flink job that cannot reach a sink usually starts with "can this pod open a TCP connection to the broker/database at all?". Without nc in the image that means attaching an ephemeral debug container (which shares the network namespace but not always the same DNS/proxy view, and is unavailable on older clusters or where image pulls are restricted). nc -zv host port answers it in one line, from the same process namespace the job runs in.

netcat-openbsd is added to the existing JDK apt-get install layer, so it costs no extra image layer and ~30 KB.

Usage

kubectl exec -it <taskmanager-pod> -- nc -zv kafka.default.svc.cluster.local 9092
kubectl exec -it <taskmanager-pod> -- nc -zv postgres 5432

Documented in the README next to the async-profiler section, which covers the same "tools that ship in the image for debugging" ground.

Verification

Built the base image with the added package and confirmed the binary resolves:

#6 [3/3] RUN nc -h 2>&1 | head -3 && which nc
#6 0.137 OpenBSD netcat (Debian patchlevel 1.226-1ubuntu2)
#6 0.137 usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl]
#6 0.138 /usr/bin/nc

mvn clean test passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_012YMC1TkuNLcyLkbv4ekqc6

Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
@ferenc-csaky ferenc-csaky added the enhancement New feature or request label Sep 3, 2026
@ferenc-csaky ferenc-csaky added this to the 0.11.2 milestone Sep 3, 2026
@ferenc-csaky
ferenc-csaky merged commit 7395a9a into main Sep 3, 2026
19 checks passed
@ferenc-csaky
ferenc-csaky deleted the feat/netcat-in-image branch September 3, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants