Twenty developers have cluster-admin on the production cluster. How do you tighten RBAC without blocking their work?

IntermediateScenarioSecurity incidents
Answer

Situation read → Developers mostly need read access and debugging in prod. Writes should go through the pipeline.

What I'd do →

  1. Check the audit logs to see what they actually do in prod over a month: mostly get, logs, exec, occasionally rollout restart.
  2. Map groups from the IdP to Kubernetes RBAC (EKS access entries or aws-auth replacement), not individual users.
  3. Default role: namespaced read-only plus logs. Give a narrower "operator" role for on-call (rollout restart, scale).
kind: Role
rules:
  - apiGroups: [""]
    resources: ["pods", "pods/log", "services", "configmaps", "events"]
    verbs: ["get", "list", "watch"]
  - apiGroups: ["apps"]
    resources: ["deployments", "deployments/scale"]
    verbs: ["get", "list", "patch"]
  1. Keep cluster-admin as break-glass only: time-limited, approved, and alerted on use.
  2. Make GitOps the write path, so most people never need write access in prod.

Why → Basing roles on real usage avoids both over-granting and the angry "I can't do my job" tickets.

Interview tip → Note that pods/exec is effectively a write permission; treat it as privileged.

All Real-World Interview questions Roadmap: Interview readiness

More on Security incidents