easykubectl

List all NetworkPolicy resources across every namespace in the cluster

command

kubectl get networkpolicies --all-namespaces

also accepted

kubectl get netpol --all-namespaceskubectl get netpol -A

Command breakdown

Part of the Kubernetes CLI (kubectl) — kubectl Advanced category.

kubectlgetnetworkpolicies--all-namespaces
FlagPurpose
--all-namespacesBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →