Kubernetes Network Debugging Cheat Sheet/Test outbound access from a pod

Validate whether egress is blocked by policy or firewall.

Section: Network Policies

Test outbound access from a pod

bash
bash
kubectl exec -it <pod> -n <namespace> -- curl -I https://example.com

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 Network Policies
List NetworkPolicies
See which policies apply in a namespace.
OpenIn sheetbashsame section
Describe a NetworkPolicy
Inspect ingress and egress selectors and ports.
OpenIn sheetbashsame section
Show pod labels
Verify whether labels match network policy selectors.
OpenIn sheetbashsame section
List services
Check Service types, ports, and cluster IPs.
List Ingress objects
Inspect ingress addresses and classes.
Port-forward to a service
Test an internal service from your workstation.