Section: Network Policy

Apply network policy

bash
bash
kubectl apply -f networkpolicy.yaml
Explanation

Create or update a NetworkPolicy manifest.

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 Policy
List network policies
Show NetworkPolicy resources.
OpenIn sheetbashsame section
Describe network policy
Inspect ingress and egress rules.
OpenIn sheetbashsame section
Delete network policy
Remove a NetworkPolicy.
OpenIn sheetbashsame section
List services
Show services across namespaces.
List PVCs
Show PersistentVolumeClaims across namespaces.
List configmaps
Show ConfigMaps across namespaces.