On self-managed Kubernetes, how do you secure etcd and the control plane?
AdvancedProductionKubernetes Security Posture
Answer
- etcd reachable only from API servers: separate hosts or firewalled, client and peer TLS with certificate auth (
--client-cert-auth=true,--peer-client-cert-auth=true). - Encrypt Secrets at rest with a KMS v2 provider (
EncryptionConfiguration), not justaescbcwith a key on disk. - Encrypted etcd backups stored off-cluster; access to backups is as sensitive as cluster-admin.
- API server:
--anonymous-auth=falsewhere possible,--authorization-mode=Node,RBAC, audit logging enabled, admission plugins includingNodeRestriction. - Control plane nodes run no workloads (taints) and have restricted SSH.
- Validate with
kube-bench run --targets master,etcd.
More on Kubernetes Security Posture
What is your security baseline for a new production EKS cluster?IntermediateDraw the layered security controls for workloads on Kubernetes.BeginnerHow do you assign Pod Security Admission levels across namespaces in production?BeginnerKyverno, OPA Gatekeeper or ValidatingAdmissionPolicy: how do you choose?IntermediateShow a ValidatingAdmissionPolicy that blocks containers without resource limits.AdvancedHow do you roll out default-deny NetworkPolicies in a running production cluster?Intermediate