[root@00VMTL-FabricPeer-172-19-102-59 ~]# kubeadm join 172.19.102.78:6443 --token u6zbdr.k2krdy0is29izjjm --discovery-token-ca-cert-hash sha256:6fbb8d21ba001706556b0bf9e8200dd4da713a7c045168cf027d1667ad93c5e5
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING Swap]: running with swap on is not supported. Please disable swap
[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.14" 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] Activating the kubelet service
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
[kubelet-check] Initial timeout of 40s passed.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[root@00VMDL-FabricCli-172-19-101-63 ~]# kubeadm join 172.19.102.78:6443 --token u6zbdr.k2krdy0is29izjjm \
> --discovery-token-ca-cert-hash sha256:6fbb8d21ba001706556b0bf9e8200dd4da713a7c045168cf027d1667ad93c5e5 --ignore-preflight-errors=Swap
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING Swap]: running with swap on is not supported. Please disable swap
[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'
error execution phase preflight: unable to fetch the kubeadm-config ConfigMap: failed to get config map: Unauthorized
[root@00VMDL-FabricCli-172-19-101-63 ~]# kubeadm join 172.19.102.78:6443 --token s83ac1.vkteydkm98a1dofi --discovery-token-ca-cert-hash sha256:6fbb8d21ba001706556b0bf9e8200dd4da713a7c045168cf027d1667ad93c5e5
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Swap]: running with swap on is not supported. Please disable swap
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
solution:
1、add the parameter in the command end:
--ignore-preflight-errors=Swap
2、exection follow steps:
[root@k8s-master ~]# ^C
[root@k8s-master ~]# swapoff -a^C
[root@k8s-master ~]# ^C
[root@k8s-master ~]# vi /etc/hosts
[root@k8s-master ~]# kubeadm reset
3、join again
[root@00VMTL-FabricPeer-172-19-102-59 ~]# kubeadm join 172.19.102.78:6443 --token u6zbdr.k2krdy0is29izjjm --discovery-token-ca-cert-hash sha256:6fbb8d21ba001706556b0bf9e8200dd4da713a7c045168cf027d1667ad93c5e5 --ignore-preflight-errors=Swap
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[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.14" 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] Activating the kubelet service
[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.