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

kubeadm do not rotate kubelet certificate on master nodes #1819

Closed
LuckySB opened this issue Oct 4, 2019 · 3 comments
Closed

kubeadm do not rotate kubelet certificate on master nodes #1819

LuckySB opened this issue Oct 4, 2019 · 3 comments
Assignees
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@LuckySB
Copy link

LuckySB commented Oct 4, 2019

FEATURE REQUEST

Versions

kubeadm version
v1.15.0 and above

What happened?

Kubeadm upgrade do not rotate kubelet certificate on master nodes.
On these nodes, the certificate is in /etc/kubernetes/kubelet.conf

and when updating the cluster it is also necessary to rotate it as control plane certificates in
controller-manager.conf and scheduler.conf

@neolit123 neolit123 added this to the v1.17 milestone Oct 5, 2019
@neolit123
Copy link
Member

neolit123 commented Oct 5, 2019

the contents of the /etc/kubernetes/kubelet.conf on the primary CP node (the one where you called init) and the secondary ones, those that joined later are different.

for the primary we do not support rotation currently and that's a bug tracked here:
#1753

what are the contents of the kubelet.conf on secondary nodes in your case?

@neolit123
Copy link
Member

also as can be seen here kubeadm should be able to rotate the .conf certs on upgrade:
https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#check-certificate-expiration

bug there is another bug where you have to pass --certificate-renewal:
#1818

@neolit123 neolit123 self-assigned this Oct 5, 2019
@neolit123 neolit123 added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Oct 5, 2019
@LuckySB
Copy link
Author

LuckySB commented Oct 6, 2019

the contents of the /etc/kubernetes/kubelet.conf on the primary CP node (the one where you called init) and the secondary ones, those that joined later are different.

You are right, this is my mistake, the bootstrap TLS procedure is used on the added control plane nodes.

for the primary we do not support rotation currently and that's a bug tracked here:
#1753

my fix. Rotate kublet certificate on primary CP node by command
kubeadm alpha kubeconfig user --client-name system:node:master-1.domain.tld --org system:nodes >kubelet.conf

Looking forward to accepting kubernetes/kubernetes#83339

@LuckySB LuckySB closed this as completed Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

2 participants