Interview Prep/DevSecOps/Kubernetes Security Posture

Which RBAC permissions do you treat as equivalent to cluster-admin, and how do you find them?

AdvancedProductionKubernetes Security Posture
Answer

Watch for:

  • escalate or bind on roles/rolebindings (grant yourself more).
  • impersonate on users, groups or service accounts.
  • create on pods (or workloads) in a namespace with privileged service accounts, or without PSA, since you can mount any service account or the host.
  • get/list/watch on secrets cluster-wide (service account tokens and credentials).
  • create on serviceaccounts/token, nodes/proxy, certificatesigningrequests/approval.
  • update on validating/mutating webhook configurations.

Find them with:

kubectl auth can-i --list --as=system:serviceaccount:argo:argo-server
kubectl get clusterrolebindings -o json | jq -r '.items[] | select(.roleRef.name=="cluster-admin") | .metadata.name'

Tools such as rbac-tool, KubiScan or Kubescape report these paths across the cluster.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Kubernetes Security Posture