正常运行的k8s集群中,新添加node节点到集群中
在master节点上操作
# kubeadm token create --print-join-command
W0428 15:13:25.968492 30448 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
kubeadm join 10.251.252.221:9443 --token hifnko.xcol6b2ewo7jgubh --discovery-token-ca-cert-hash sha256:3618ee249051a5d6fd487b07f196d3ed7553e75fec54150ead01d91751e38909
在新的node节点上操作
# kubeadm join 10.251.252.221:9443 --token hifnko.xcol6b2ewo7jgubh --discovery-token-ca-cert-hash sha256:3618ee249051a5d6fd487b07f196d3ed7553e75fec54150ead01d91751e38909
W0428 15:18:51.670855 62213 join.go:346] [preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.
[preflight] Running pre-flight checks
[WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.14. Latest validated version: 19.03
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.18" ConfigMap in the kube-system namespace
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.
Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
在master上get node后,新节点已经ready