#问题现象:标签:node,--,virtual,machine,small,kubeadm,K8S,节点 From: https://www.cnblogs.com/anslinux/p/16849987.html
root@small-virtual-machine:~# kubeadm join 10.0.0.133:6443 --token d2hyl5.5qt5fzjsdbxm2k5o --discovery-token-ca-cert-hash sha256:d02674df33be841548271e7f4333299a8bb39b2cf6c56b8bf90749d04b8ec0b1
[preflight] Running pre-flight checks
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
W0914 09:12:14.393353 3271 utils.go:69] The recommended value for "resolvConf" in "KubeletConfiguration" is: /run/systemd/resolve/resolv.conf; the provided value is: /run/systemd/resolve/resolv.conf
error execution phase kubelet-start: a Node with name "small-virtual-machine" and status "Ready" already exists in the cluster. You must delete the existing Node or change the name of this new joining Node
To see the stack trace of this error execute with --v=5 or higher
root@small-virtual-machine:~# hostnamectl set-hostname node01
#解决:
原因是因为部署K8S集群的时候没有更改主机名导致。更改主机名以后重新kubeadm join即可