A Kubernetes kubeconfig with a client certificate for `system:masters` was copied to a contractor laptop. What now?
AdvancedScenarioSecrets and Identity Management
Answer
Situation read → Client certificates cannot be revoked individually in Kubernetes, and system:masters bypasses RBAC.
What I'd do →
- On managed clusters, check whether the cert came from the cluster CA; rotating the CA is the only real revocation.
- Plan a CA rotation: on EKS that means a new cluster or the documented cert rotation path; on kubeadm
kubeadm certs renewdoes not revoke, so a CA change is needed. - Meanwhile, restrict API endpoint access to known CIDRs or private-only.
- Review audit logs for that certificate's
CN. - Going forward, give humans access only via OIDC/IAM-mapped identities, never long-lived client certs.
Why → You cannot delete a cert from Kubernetes; trust lives in the CA.
Interview tip → Knowing "certs cannot be revoked" separates seniors from juniors.
More on Secrets and Identity Management
A team stores database passwords in a `.env` file committed to a private repo. How do you migrate them out?BeginnerYour CI pipeline uses long-lived AWS access keys stored as repository secrets. How do you replace them?IntermediateAn auditor asks how often you rotate database credentials. You currently never do. What do you build?IntermediatePods need AWS access. A developer mounted an IAM user's keys as a Kubernetes Secret. What do you propose instead?BeginnerShould you use Kubernetes Secrets, Sealed Secrets, External Secrets Operator or the Secrets Store CSI driver?IntermediateA Slack webhook URL and a Stripe live key were posted in a public GitHub issue. What is your response sequence?Beginner