Skip to main content

More Info:

Verifies no pod sets hostPID, hostIPC or hostNetwork. Sharing a host namespace breaks the isolation boundary between the pod and the node.

Risk Level

Critical

Address

Security

Compliance Standards

  • Cloudanix Best Practice

Triage and Remediation

Remediation

Manual Steps

  1. Identify non-compliant Pods (run on any machine with kubectl access):
  2. For each non-compliant Pod that is controlled by a higher-level object (Deployment, DaemonSet, StatefulSet, Job, etc.), edit the controller manifest to remove host namespace sharing (run on any machine with kubectl access):
    In the opened spec, under spec.template.spec, ensure:
    Save and exit; Kubernetes will roll out updated Pods.
  3. For non-compliant standalone Pods (no controller ownerReferences), patch the Pod spec so it no longer shares host namespaces (run on any machine with kubectl access):
    If the Pod definition is created from a manifest you maintain, also update that manifest’s spec section in source control to omit these fields or set them to false.
  4. If any non-compliant Pods are part of critical EKS add-ons you manage yourself (for example, custom CNI or monitoring agents), review whether they truly require hostPID/hostIPC/hostNetwork. Where feasible, redesign them to use Kubernetes primitives (e.g., downward API, privileges limited to required resources) instead of host namespace sharing, then update their controller manifests as in step 2.
  5. If a Pod genuinely requires a host namespace (for example, a node-level troubleshooting DaemonSet), document the justification, namespace, controller name, and fields used (hostPID/hostIPC/hostNetwork) in your security exceptions register and consider restricting its use to dedicated admin-only namespaces and nodes.
  6. Verify all Pods now comply (run on any machine with kubectl access):
On any machine with kubectl access:
  1. Identify non-compliant pods (for context)
  1. For each affected pod, edit the owning workload (Deployment, DaemonSet, StatefulSet, etc.) and remove or set the host namespace fields to false.
Example for a Deployment:
Edit deployment-fixed.yaml so the pod template has:
Apply the updated manifest:
Repeat similarly for other controllers:
Edit each file’s spec.template.spec section to remove or set hostPID, hostIPC, and hostNetwork to false, then:
If a pod is standalone (no controller), recreate it from a manifest without these fields:
  1. Verification (same machine with kubectl):