All jobs / DevOps / SRE / cloud / Kubernetes
DevOps / SRE / cloud interview question · 5+ years
Thirty teams share a few clusters. Requests for cluster-admin “just to deploy” arrive weekly.
How do you hand out access?
The strongest answer
A namespace per team and environment, Roles and RoleBindings scoped to it and bound to SSO groups, quotas and admission policies — cluster-admin stays a logged break-glass, never a daily role
Why it works
Right — least privilege in Kubernetes is namespace scope plus group binding; the platform enforces the boundary instead of asking for care.
What a good answer covers
- Namespace per team and environment.
- Role plus RoleBinding, not ClusterRole.
- Bind groups, not people.
- Cluster-admin is break-glass.
Answers that fall short
- Close, but not the strongest: Give each team a ClusterRole with everything except the dangerous verbs
Cluster-wide roles still cross team boundaries; a mistake or compromise reaches every namespace. - Weak: Grant cluster-admin but ask everyone to be careful and only touch their own namespaces
Asking thirty teams to be careful is not a control; RBAC exists so you do not have to. - Red flag: One shared service account token in the CI system that every team’s pipeline uses
One shared token means no attribution, no rotation and cluster-wide compromise from any one pipeline.
Who gets asked this
More Kubernetes questions
- A service’s health URL always returns 200 from the process start. What did you miss?
- A candidate says “Kubernetes is Docker for production.” What is the cleaner sentence?
- Which Kubernetes object do you reach for: a stateless API, a database, a log agent on every node, and a…
- ConfigMap or Secret for a database password — and is a Secret encrypted?
- A pod is killed in a loop while it is still migrating. Which probe was wrong?
- Pods are Pending while nodes look empty in the console. What did you forget?
- You have five HTTP services. One Service of type LoadBalancer each, or an Ingress?
- What does Helm give you over applying raw YAML, and what does `helm rollback` not do?