Securing etcd cluster¶
This document will describe all the TLS artifacts that are typically generated for setting up etcd-druid and etcd clusters in Gardener clusters. You can take inspiration from this and decide which communication lines are essential to be TLS enabled.
Communication lines¶
In order to undertand all the TLS artifacts that are required to setup etcd-druid and one or more etcd-clusters, one must have a clear view of all the communication channels that needs to be protected via TLS. In the diagram below all communication lines in a typical 3-node etcd cluster along with kube-apiserver and etcd-druid is illustrated.
Info
For Gardener setup all the communication lines are TLS enabled.
TLS artifacts¶
An etcd cluster setup by etcd-druid leverages the following TLS artifacts:
- Certificate Authority used to sign server and client certificate key-pair for
etcd-backup-restorespecified viaetcd.spec.backup.tls.tlsCASecretRef. - Server certificate key-pair specified via
etcd.spec.backup.tls.serverTLSSecretRefused byetcd-backup-restoreHTTPS server. - Client certificate key-pair specified via
etcd.spec.backup.tls.clientTLSSecretRefused byetcd-wrapperto securely communicate to theetcd-backup-restoreHTTPS server. - Certificate Authority used to sign server and client certificate key-pair for
etcdandetcd-wrapperspecified viaetcd.spec.etcd.clientUrlTls.tlsCASecretReffor etcd client communication. - Server certificate key-pair specified via
etcd.spec.etcd.clientUrlTls.serverTLSSecretRefused byetcdandetcd-wrapperHTTPS servers. - Client certificate key-pair specified via
etcd.spec.etcd.clientUrlTls.clientTLSSecretRefused by: etcd-wrapperandetcd-backup-restoreto securely communicate to theetcdHTTPS server.-
etcd-backup-restoreto securely communicate to theetcd-wrapperHTTPS server. -
Certificate Authority used to sign server certificate key-pair for
etcdpeer communication specified viaetcd.spec.etcd.peerUrlTls.tlsCASecretRef. - Server certificate key-pair specified via
etcd.spec.etcd.peerUrlTls.serverTLSSecretRefused foretcdpeer communication.
Note
TLS artifacts should be created prior to creating Etcd clusters. etcd-druid currently does not provide a convenience way to generate these TLS artifacts. etcd recommends to use cfssl to generate certificates. However you can use any other tool as well. We do provide a convenience script for local development here which can be used to generate TLS artifacts. Currently this script is part of etcd-wrapper github repository but we will harmonize these scripts to be used across all github projects under the etcd-druid ecosystem.
