Inspect ingress and egress selectors and ports.

Section: Network Policies

Describe a NetworkPolicy

bash
bash
kubectl describe networkpolicy <name> -n <namespace>

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
Show pod labels
Verify whether labels match network policy selectors.
OpenIn sheetbashsame section
Test outbound access from a pod
Validate whether egress is blocked by policy or firewall.
OpenIn sheetbashsame section
Describe a service
Inspect selectors, target ports, and events.
OpenIn sheetbash1 tag match
Describe an Ingress
Check backend mapping, TLS, and events.
OpenIn sheetbash1 tag match
Describe an EndpointSlice
Inspect ready addresses and ports at slice level.
OpenIn sheetbash1 tag match