- You want to revoke access to the cluster for a leaked break-glass
kubeconfigortalosconfig; - You have imported a Talos cluster into Omni and want to remove the label
tainted-by-importing; - The root CA certificate is approaching its 10-year expiration.
Overview
There are some details which make Talos and Kubernetes API root CA rotation a bit different, but the general flow is the same:- Generate new CA certificate and key;
- Add new CA certificate as ‘accepted’, so new certificates will be accepted as valid;
- Swap issuing CA to the new one, old CA as accepted;
- Refresh all certificates in the cluster;
- Remove old CA from ‘accepted’.
- PRE-ROTATE: Add a new CA certificate as ‘accepted’,
- ROTATE: Swap issuing CA to the new one,
- POST-ROTATE: Remove old CA from ‘accepted’.
Talos API CA rotation
Talos API CA rotation doesn’t interrupt connections within the cluster, and it doesn’t require a reboot of the nodes. Run the following command to rotate the Talos API CA:--wait-timeout flag) is reached.
To return immediately without waiting for completion, use --wait=false.
If using the Talos API access from Kubernetes feature, pods might need to be restarted manually to pick up the new
talosconfig.Kubernetes API CA rotation
The automated process only rotates Kubernetes API CA, used by thekube-apiserver, kubelet, etc. The rotation doesn’t require a reboot of the nodes.
Run the following command to rotate the Kubernetes API CA:
--wait-timeout flag) is reached.
To return immediately without waiting for completion, use --wait=false.
At the end of the process, Kubernetes control plane components will be restarted to pick up CA certificate changes.
Each node kubelet will re-join the cluster with a new client certificate.
Kubernetes pods might need to be restarted manually to pick up changes to the Kubernetes API CA.