Skip to main content

More Info:

The ability to create Pods can be abused to run privileged workloads and escalate access. Limit pod-create rights to the minimum required.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. List who can create pods and through which roles
    • Run on: any machine with kubectl access
    Then more precisely:
  2. Inspect a specific role/clusterrole that grants pod create
    • Run on: any machine with kubectl access
      Replace <KIND> with role or clusterrole, <NAME> with the name from step 1, and <NAMESPACE> for Roles (omit for ClusterRoles):
  3. Decide whether each “create pods” permission is truly required (manual review)
    • For each role/clusterrole from step 1:
      • Identify what workload or team uses it by checking its rolebindings:
      • Confirm whether those subjects actually need to create pods. If not clearly required (for example, they only need to read or list pods), plan to remove the create verb for pods from that role.
  4. Edit the role/clusterrole to remove pod create rights
    • Run on: any machine with kubectl access
    • For each role/clusterrole where create on pods is not strictly needed:
    In the editor, locate any rules entry where resources includes pods and verbs includes create, and remove create from that list (or remove the whole rule if it only existed for pod creation). Save and exit.
  5. If authorization is managed via manifests/IaC, update the source files
    • Run on: any machine with access to your Git/IaC repo
    • Locate the YAML defining the same Role/ClusterRole objects (matching names from step 4) and remove create from verbs for pods there as well, then apply:
  6. Verify that unauthenticated users cannot create pods cluster-wide
    • Run on: any machine with kubectl access
    Ensure the output is:
    canCreatePodsAsSystemAuthenticated: no
Review the roles/clusterroles above and decide which truly need to create pods. For each one that should not have this right, remove create from the pods rule.Example: editing an over‑permissive ClusterRole named dev-users:
Open dev-users-clusterrole.yaml in an editor and, in any rule with resources: ["pods"] (or including pods), remove create from verbs:
Then apply the change:
Example: editing a namespaced Role dev-namespace:dev-role:
Edit dev-role.yaml similarly, removing create from any rule that lists pods in resources, then:
Repeat this edit/apply process for each Role/ClusterRole that should not be able to create pods.