Case A05774 · Cloud · L3 Applied
Hardening a Kubernetes Cluster
Interview questionYou have just been handed a new managed Kubernetes cluster for production. What do you lock down first?
- 01 Answer
- 02 Example
- 03 Trade-offs
What a strong answer covers
Try it out loud first. Then check yourself:
- API server: private or IP-restricted endpoint, SSO-backed auth, audit logging on, no anonymous access
- RBAC: no day-to-day cluster-admin; treat create pods, exec and get secrets as privileged verbs
- Workloads: Pod Security Admission restricted, no privileged, hostPath or hostNetwork, non-root, enforced at admission
- Default-deny network policies, block pods from node metadata, and use workload identity instead of the node role
- Trade-off: restricted policies break legacy charts; roll out in warn and audit mode first, then enforce
If the interviewer pushes back
- A pod can reach the node instance metadata endpoint. What does an attacker get, and how do you block it?