← Services537 / 640
easykubectl

List all NetworkPolicy resources in a specific namespace

command

kubectl get networkpolicies -n NAMESPACE

also accepted

kubectl get networkpolicies -n

Command breakdown

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

kubectlgetnetworkpolicies-nNAMESPACE
FlagPurpose
-nBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →