More Info:
Verifies each application namespace has a default-deny ingress NetworkPolicy. Without one, every pod is reachable from every other pod.Risk Level
HighAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List non-system namespaces missing a default-deny NetworkPolicy
Run on: any machine with kubectl access -
Pick one non-compliant application namespace to fix
From the previous output, note the value aftername=for each line withis_compliant=false. Choose one namespace (for exampleapp-namespace) and substitute that name exactly in the following commands. -
Create a default-deny ingress NetworkPolicy manifest for that namespace
Run on: any machine with kubectl access (local file creation)Replace every occurrence ofapp-namespacewith the actual namespace name you are fixing. -
Apply the default-deny ingress NetworkPolicy
Run on: any machine with kubectl access -
Repeat for remaining non-compliant namespaces
For each other namespace shown withis_compliant=false, repeat steps 3–4, adjusting the filename and thenamespace:field each time (or reuse the same filename and overwrite it before eachkubectl apply). -
Verify all non-system namespaces now have a default-deny ingress NetworkPolicy
Run on: any machine with kubectl accessConfirm there are no lines withis_compliant=false.
Using kubectl
Using kubectl
Automation
Automation

