You need to capture traffic from a Kubernetes pod whose image has no shell or tcpdump.
IntermediateTroubleshootingContainers, Kubernetes, IPv6 and packet captures
Answer
Likely causes → Distroless or minimal images don't include tools, and you shouldn't add them. The pod's network namespace is shared by all containers in the pod, so you can attach a tool container to it.
Diagnose →
# ephemeral debug container sharing the pod network namespace
kubectl debug -it pod/myapp-7d9f -n prod --image=nicolaka/netshoot --target=app -- tcpdump -ni eth0 -w /tmp/cap.pcap port 8080
# or from the node
crictl inspect <container-id> | grep -m1 '"pid"'
sudo nsenter -t <pid> -n tcpdump -ni eth0 port 8080 -w /tmp/cap.pcap
Fix → Copy the capture out for analysis: kubectl cp prod/myapp-7d9f:/tmp/cap.pcap ./cap.pcap -c <debug-container-name>, or stream it live: kubectl debug ... -- tcpdump -ni eth0 -U -w - > cap.pcap.
Prevent → Allow kubectl debug through RBAC for on-call engineers only, and document the procedure in the runbook.
More on Containers, Kubernetes, IPv6 and packet captures
After someone ran `iptables -F` (or restarted firewalld), all Docker containers lost outbound connectivity.Intermediate`docker run -p 8080:80 myapp` starts fine, but `curl localhost:8080` returns `Connection reset by peer`.BeginnerTwo containers on the default bridge network can't reach each other by container name.Beginner`docker run -p 80:80 nginx` fails with `Bind for 0.0.0.0:80 failed: port is already allocated`.BeginnerA new Kubernetes node stays `NotReady` with `container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized`.IntermediateA Service returns `Connection refused` / nothing, and `kubectl get endpoints myapp` shows `<none>`.Beginner