kubernetes/cmd/kubeadm/app/phases
Lubomir I. Ivanov b117a928a6 kubeadm: prevent bootstrap of nodes with known names
If a Node name in the cluster is already taken and this Node is Ready,
prevent TLS bootsrap on "kubeadm join" and exit early.

This change requires that a new ClusterRole is granted to the
"system:bootstrappers:kubeadm:default-node-token" group to be
able get Nodes in the cluster. The same group already has access
to obtain objects such as the KubeletConfiguration and kubeadm's
ClusterConfiguration.

The motivation of this change is to prevent undefined behavior
and the potential control-plane breakdown if such a cluster
is racing to have two nodes with the same name for long periods
of time.

The following values are validated in the following precedence
from lower to higher:
- actual hostname
- NodeRegistration.Name (or "--node-name") from JoinConfiguration
- "--hostname-override" passed via kubeletExtraArgs

If the user decides to not let kubeadm know about a custom node name
and to instead override the hostname from a kubelet systemd unit file,
kubeadm will not be able to detect the problem.
2020-01-26 18:50:54 +02:00
..
addons kubeadm: kube-dns is deprecated and will not be supported in a future version 2019-12-24 10:11:24 +08:00
bootstraptoken kubeadm: prevent bootstrap of nodes with known names 2020-01-26 18:50:54 +02:00
certs Updating minor grammar errors. 2019-12-26 13:48:19 -05:00
controlplane change print log for unity when during kubeadm init 2019-12-24 10:13:48 +09:00
copycerts [kubernetes/kubeadm] fix minor nil issues in kudeadm code 2019-08-14 21:49:39 -07:00
etcd kubeadm: use correct IP family for etcd localhost 2019-11-30 17:25:30 +01:00
kubeconfig kubeadm: tolerate whitespace when validating user CA PEMs 2019-12-30 22:16:41 +02:00
kubelet kubeadm: prevent bootstrap of nodes with known names 2020-01-26 18:50:54 +02:00
markcontrolplane Revert "kubeadm: enable kubelet certificate rotation on primary CP nodes" 2019-10-16 20:45:55 +03:00
patchnode Revert "kubeadm: enable kubelet certificate rotation on primary CP nodes" 2019-10-16 20:45:55 +03:00
selfhosting alias kubeadmutil for k8s.io/kubernetes/cmd/kubeadm/app/util 2019-12-27 17:57:04 +08:00
upgrade kubeadm upgrades always persist the etcd backup for stacked 2020-01-06 12:34:28 +08:00
uploadconfig kubeadm: Group centric component configs 2019-11-26 13:55:28 +02:00