Skip to main content

More Info:

The ability to create pods can be abused to run privileged workloads or bypass admission controls. Restrict create access to pod objects to only the subjects that require it.

Risk Level

High

Address

Security

Compliance Standards

  • CIS OKE

Triage and Remediation

Remediation

Manual Steps

  1. List all roles/clusterroles that can create pods
    • Run on: any machine with kubectl access
    • Command:
  2. Identify which subjects are bound to those roles
    • Run on: any machine with kubectl access
    • For each name from step 1, get the bindings:
    • Record which users, groups, and service accounts have pod create access, and in which namespaces.
  3. Decide which subjects truly need pod creation capability
    • For each subject from step 2, review:
      • What application or team it belongs to.
      • Whether it must create pods (e.g., controllers, CI/CD, autoscalers) or only needs to manage higher‑level objects (Deployments, Jobs, etc.).
    • Document for each subject: “needs pod create” or “does not need pod create”.
  4. Remove unnecessary pod create verbs from roles
    • Run on: any machine with kubectl access
    • For each Role/ClusterRole where some or all subjects do not need pod creation:
      a) If no bound subjects need pod creation, remove the create (and * if present) verb for pods from the rule:
      • In the editor, locate rules with:
        and remove create (or replace * with the minimal required verbs excluding create).
        b) If some subjects still require pod creation but others do not, create a new limited role and rebind:
      • Then remove the unnecessary subjects from the original binding via:
  5. Revalidate effective permissions after changes
    • Run on: any machine with kubectl access
    • For each key subject, confirm whether it can still create pods:
    • Expect no for all subjects that do not require pod creation, and yes only for explicitly approved subjects.
  6. Periodic review and evidence collection
    • Run on: any machine with kubectl access
    • Capture current state for audit purposes and future reviews:
    • Schedule periodic re‑runs of steps 1–5 or integrate them into CI/CD or policy-as-code to ensure ongoing minimization of pod create access.
Problem indication: Any ClusterRole listed here grants create on pods. Every such role must be reviewed to confirm it’s truly needed.
What to look for in the output (problem indications):
  • resources: ["pods"] or resources: ["*"] combined with verbs including "create" or "*".
  • Broad use of apiGroups: ["*"] or resources: ["*"] where pod creation is not clearly necessary.
  • ClusterRoles with pod-create rights that are clearly generic (e.g. edit, admin, custom “developer” roles) rather than narrowly scoped operational roles.

Problem indication: Highly privileged or generic subjects (e.g. broad groups like system:authenticated, developers, or many service accounts across namespaces) bound to ClusterRoles that can create pods.
Problem indication: Namespaced RoleBindings exposing pod-create rights via ClusterRoles to many users or generic groups across multiple namespaces.
Problem indication: Roles in many namespaces granting pod create to non-operational subjects or generic “developer”/“default” subjects, indicating pod creation is widely available.
Interpretation guidance (manual decision):
  • Acceptable: tightly scoped Roles/ClusterRoles used by:
    • CI/CD or controllers that must create pods.
    • Operational teams in specific namespaces where pod creation is required.
  • Concerning:
    • Global or semi-global roles bound to large groups (system:authenticated, all developers).
    • Roles where resources: ["*"] and verbs: ["*"] or "create" are present without a clear operational justification.
    • Service accounts in many namespaces that can create pods despite not being controllers.