hardkubectl
Apply a NetworkPolicy manifest to restrict ingress or egress traffic between pods
command
kubectl apply -f networkpolicy.yamlalso accepted
kubectl apply -fcommand
kubectl apply -f networkpolicy.yamlalso accepted
kubectl apply -fPart of the Kubernetes CLI (kubectl) — Services category.
| Flag | Purpose |
|---|---|
-f | Boolean flag |
Test your recall — not just your reading.
Practice with interactive quiz →