`curl` to a pod IP works, but `curl` to the Service's ClusterIP times out.
IntermediateTroubleshootingContainers, Kubernetes, IPv6 and packet captures
Answer
Likely causes → The Service's targetPort doesn't match the container port, or kube-proxy (or its eBPF replacement) isn't programming rules on that node: crashed, wrong mode, or rules out of sync.
Diagnose →
kubectl get svc myapp -o jsonpath='{.spec.ports}'; echo
kubectl get endpointslices -l kubernetes.io/service-name=myapp -o yaml | grep -A3 ports
kubectl -n kube-system get pods -l k8s-app=kube-proxy -o wide
sudo iptables -t nat -S KUBE-SERVICES | grep <cluster-ip> # iptables mode
sudo ipvsadm -Ln | grep -A3 <cluster-ip> # ipvs mode
Fix → Correct targetPort (name the container port and reference it by name), or restart/fix kube-proxy on the affected node.
Prevent → Use named ports and alert on kube-proxy sync_proxy_rules errors.
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