-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fix --kubelet-certificate-authority not defined #2496
Conversation
{% set idx = idx + 1 %} | ||
{% for host in groups['kube-node'] %} | ||
{% if hostvars[host]['access_ip'] is defined %} | ||
IP.{{ counter["ip"] }} = {{ hostvars[host]['access_ip'] }}{{ increment(counter, 'ip') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't scale. It means recreating kube-apiserver cert every time you want to add/remove a node. This is a destructive process which means forcing regeneration of service account secrets and restarting affected pods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Didn't think of that. Any suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we should only generate a unique certificate per node and apply a openssl.conf ony with the node's ip/dns in it. And then sign it by the CA file.
That would be the right way to do it
Just ran into a similar problem, trying to replace a 'crash-and-burn'ed master node by a 'new' one, but using a different IP:
Indeed, the list of 'valid' IPs are the original nodes, including the crashed one, and not the new one. Creating a single CA once, then having per-server keys & certs, generated when necessary or even for every run, seems like a more correct approach, no? |
You are totally right. I just need to update the PR to do so. Or feel free to make a PR that does and we can close this. |
Have this been implemented in some other PR maybe? |
|
--kubelet-certificate-authority
is currently undefined on the kube apiserver. Enabling it causes the following error to happen, as nodes are not in the signed ip range in certs:Looking at the
openssl.conf
file on a master, it reveals that no node ip adresses are actually in any certs for the nodes:Like here,
10.50.64.11
is missing which is a node, not a master.