Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Renewing Etcd Certs #5400

Open
vignesh-goutham opened this issue Mar 27, 2023 · 2 comments
Open

Auto Renewing Etcd Certs #5400

vignesh-goutham opened this issue Mar 27, 2023 · 2 comments

Comments

@vignesh-goutham
Copy link
Member

What would you like to be added:
Etcdadm generates a root CA that is valid for 10 years. In addition to the root CA, etcdadm generates the following certs for normal operation of etcd. These are created for external etcd stack, kubeadm handles stacked etcd certificates.

  • Peer Client Certs
  • Api Server Etcd Client Certs
  • Etcdctl Client Certs
  • Etcd Server Certs

All these four certs have an expiry of 1 year. If there is no upgrade operation on the cluster that involves rolling out all old machines with new OS/nodes, these certs are not renewed and are at risk of expiry. At expiration, etcd fails to operate and api-server will not serve any requests, followed by workload failures.

EKS-A should

  • Build in certs renewal. This could be a new EKS-A cli command, or an automated way that could be set with cluster spec during create/upgrade.
  • Provide documentation on how to renew certs manually.
  • Provide documentation on how to renew certs that have already expired.
@vignesh-goutham
Copy link
Member Author

This person has a PR into etcdadm to expose a renew certs cli like kubeadm has - https://serverfault.com/questions/1054126/etcd-database-cluster-certificate-renewal-for-kubernets-external-database-setup

These code changes were tested and renews the certs appropriately. One complication here is, etcdadm generates a cert on each etcd node for api-server's etcd client. Each of these certs have the etcd node's name as CN on the cert. Instead of using this, etcdam controller should create a cert, update the secret on the cluster, which kubeadm controllers should pick up and update the api-server, like it happens on a create or upgrade workflow. Unfortunately, this might roll out nodes, we have to figure out a way to update the certs without rolling out nodes.

@jiayiwang7 jiayiwang7 added this to the v0.16.0 milestone Mar 28, 2023
@jiayiwang7 jiayiwang7 assigned d8660091 and unassigned d8660091 Mar 28, 2023
@jiayiwang7 jiayiwang7 modified the milestones: v0.16.0, v0.17.0 May 4, 2023
@jiayiwang7 jiayiwang7 modified the milestones: v0.17.0, v0.18.0 Jul 10, 2023
@jiayiwang7 jiayiwang7 removed this from the v0.18.0 milestone Sep 22, 2023
@jiayiwang7 jiayiwang7 added this to the v0.19.0 milestone Oct 12, 2023
@jiayiwang7 jiayiwang7 modified the milestones: v0.19.0, v0.20.0 Dec 13, 2023
@jiayiwang7 jiayiwang7 modified the milestones: v0.20.0, v0.21.0 Apr 24, 2024
@vivek-koppuru
Copy link
Member

We might need to prioritize some recommendation around this in the meantime: #8778

@vivek-koppuru vivek-koppuru modified the milestones: v0.21.0, v0.22.0 Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants