How do you secure etcd?
IntermediateConceptKubernetes Security
Answer
etcd holds every Secret and the full cluster state, so read access is cluster compromise.
- TLS for client and peer traffic, with client certificate auth; only the API server holds a client cert.
- Never expose ports 2379/2380 beyond control-plane nodes.
- Encryption at rest for Secrets via
EncryptionConfigurationwith a KMS provider. - Encrypted, access-controlled backups (
etcdctl snapshot save); a snapshot is as sensitive as etcd itself.
On EKS, GKE and AKS etcd is managed and not reachable, so our job shrinks to enabling envelope encryption and protecting backups such as Velero buckets.
More on Kubernetes Security
What are the 4Cs of cloud native security?BeginnerWhat happens to a request between `kubectl apply` and etcd from a security point of view?IntermediateExplain Role, ClusterRole, RoleBinding and ClusterRoleBinding.BeginnerHow do you check what a user or service account is allowed to do?BeginnerWhich RBAC permissions are effectively cluster-admin in disguise?AdvancedHow do service account tokens work now, and what is `automountServiceAccountToken`?Intermediate