Verify whether labels match network policy selectors.

Section: Network Policies

Show pod labels

bash
bash
kubectl get pod <pod> -n <namespace> --show-labels

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
Test outbound access from a pod
Validate whether egress is blocked by policy or firewall.
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.