More Info:
Without NetworkPolicies, pods accept traffic from any source by default. Every namespace should define at least one NetworkPolicy to control pod-level traffic.Risk Level
HighAddress
SecurityCompliance Standards
- CIS AKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify namespaces missing NetworkPolicies (run on any machine with kubectl access):
-
For each namespace that needs a strict default, create a default-deny-all policy (run on any machine with kubectl access; replace NAMESPACE with one from the list above):
-
For namespaces where you cannot fully deny all traffic, create an initial restrictive policy and adjust later (example allowing only intra-namespace traffic; run on any machine with kubectl access and replace NAMESPACE):
-
Review and customize policies in critical namespaces (e.g., kube-system, monitoring, ingress) to avoid breaking traffic (run on any machine with kubectl access):
-
Optionally export policies to manifests for version control (run on any machine with kubectl access):
-
Verification (run on any machine with kubectl access):
Using kubectl
Using kubectl
On any machine with kubectl access to the cluster:Adjust the
- List namespaces currently missing NetworkPolicies (for your awareness):
- Create a default-deny NetworkPolicy in each namespace that lacks one (replace the namespace list as needed, or paste from the previous command’s output):
for ns in ... list to include every namespace that should receive a default-deny policy, based on your environment and application needs.- Verification (same command used by the audit):
Automation
Automation

