[FEATURE REQUEST]
We need some way to rotate certificates. Right now we mint certs that expire after 1 year and we have no built in provision to rotate them.
We should either have components manage rotating their own certificates (and writing the certs back to the kubeconfig) or have a way to easily do this from the outside without disrupting a running cluster. Notifying users when rotation is necessary should be part of our design here too.
@timothysc @pipejakob @mikedanese @jcbsmpsn @jbeda
Should we make this a goal for v1.8 with self-hosting and rotateable kubelet certs?
I think there are still a few steps left to accomplishing this:
Remaining:
All these might be a stretch for 1.8.
/assign @jcbsmpsn
Sub-goal of v1.8 is getting kubelet client cert rotation enabled, ref https://github.com/kubernetes/kubeadm/issues/386
Other than that, I'm moving this out for further improvements in v1.9 as new auth features regarding this are available.
It would be cool if somehow this could be configured to run automatically, via cron or something like that, like Docker Swarm mode does. Swarm mode is constantly refreshing certificates, which, to be fair, has its own set of tradeoffs (example: if a worker node panics/partitions and stops refreshing certs for a while, it's locked out of the cluster. not sure if it still happens, but that was one issue we ran into when the feature was new)
@nathanleclaire Not sure what you mean. When certificate rotation is enabled it does rotate the certificates automatically. Currently only the certificate used by the node is done. More work to do for other certificates used by Kubernetes.
@jcbsmpsn Ah, cool. Still catching up on all the fast-moving new Kube stuff :)
Now that kubelet supports auto-rotation, should we enable this feature gate in 1.9? Would we also need to feature gate it? If so, maybe we can make it generic (e.g. AllowAutoTLSRotation) to pave the way for other components in the future.
We already enable kubelet client cert autorotation. We'll enable kubelet servingcert rotation if possible in v1.9
We'll enable kubelet servingcert rotation if possible in v1.9
Not possible yet AFAIK.
In the interim we'll do #548
Ideally we could have a phase command to help rotate.
/cc @mattmoyer and @mikedanese (re: other googlers)
Suggested MVP is that you would run the phase certs rotate command per node.
@timothysc suggests we have a daemonset with hostpath mounts assist in this rotation/upgrade.
Related to kubelet server certs, once the kubelet uses a kube-issued server cert instead of the current self-signed server cert, then the kube-apiserver also needs --kubelet-certificate-authority to validate those kubelet server certs.
/assign @liztio
I've done some testing on the client cert upgrades. My methodology:
kubeadm joinopenssl req-days 2)Based on my reading of the merged features, I should've seen a new certificate for the client node be issued, but so far that hasn't happened. I'll look into this in more detail tomorrow.
Most helpful comment
I think there are still a few steps left to accomplishing this:
GABeta in 1.8.Remaining:
All these might be a stretch for 1.8.