docs/advisories/etcd-manager-certificate-expiration.md
etcd-manager configures certificates for TLS communication between kube-apiserver and etcd, as well as between etcd members. These certificates are signed by the cluster CA and are valid for a duration of 1 year.
Affected versions of etcd-manager currently do NOT automatically rotate these certificates before expiration. If these certificates are not rotated prior to their expiration, Kubernetes apiserver will become inaccessible and your control-plane will experience downtime.
Clusters are affected by this issue if they're using a version of etcd-manager < 3.0.20200428.
The etcd-manager version is set automatically based on the kOps version.
These kOps versions are affected:
The issue can be confirmed by checking for the existence of etcd-manager pods and observing their image tags:
kubectl get pods -n kube-system -l k8s-app=etcd-manager-main \
-o jsonpath='{range .items[*].spec.containers[*]}{.image}{"\n"}{end}'
kopeio/etcd-manager images with tags older than 3.0.20200428, the cluster is affected.kopeio/etcd-manager, the cluster may be affected.kopeio/etcd-manager images with tags >= 3.0.20200428, the cluster is not affected.The issue can be confirmed also by checking the certificate expiry using openssl on each master node.
find /mnt/ -type f -name me.crt -print -exec openssl x509 -enddate -noout -in {} \;
Upgrade etcd-manager. etcd-manager version >= 3.0.20200428 manages certificate lifecycle and will automatically request new certificates before expiration.
We have two suggested workflows to upgrade etcd-manager in your cluster. While both workflows require a rolling-update of the master nodes, neither require control-plane downtime (if the clusters have highly available masters).
kops update cluster.
kops update cluster --yes
kops rolling-update cluster --instance-group-roles=Master --cloudonly
kops edit cluster $CLUSTER_NAME
# Set `spec.etcdClusters[*].manager.image` to `kopeio/etcd-manager:3.0.20200428`
kops update cluster # confirm the image is being updated
kops update cluster --yes
kops rolling-update cluster --instance-group-roles=Master --force --cloudonly