k8s-network-troubleshooting
Kubernetes network troubleshooting
Find out why traffic does not get from a client to a workload, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.
Follow the path of a request: the client resolves the Service's name (DNS), connects
to the Service's port, the Service forwards to the targetPort of its ready endpoints,
and NetworkPolicies on both sides must allow it. Find the first step that fails.
The commands use placeholders: my-namespace and my-app (the target Service and its
workload), my-other-namespace and my-web (the client), and my-pod. Replace them
with the real names. Never read Secrets. If output contains passwords, tokens or keys,
do not repeat them.