Kubernetes Network Debugging Cheat Sheet/Show listening ports inside a pod

Inspect which ports the container is actually listening on.

Section: Connectivity Testing

Show listening ports inside a pod

bash
bash
kubectl exec -it <pod> -n <namespace> -- ss -lntup

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Connectivity Testing
Call a service from another pod
Validate in-cluster connectivity and service routing.
OpenIn sheetbashsame section
Call a service with wget
Useful in images that have wget but not curl.
OpenIn sheetbashsame section
Port-forward to a service
Test an internal service from your workstation.
OpenIn sheetbashsame section
Test forwarded service with curl
Call the forwarded endpoint locally.
OpenIn sheetbashsame section
Test TCP connectivity with nc
Check if a target port is reachable from inside the cluster.
OpenIn sheetbashsame section
List services
Check Service types, ports, and cluster IPs.
OpenIn sheetbash1 tag match