k8s join 集群报错之error execution phase kubelet-start: error uploading crisocket:
集群删除时再join时报错如下:
[kubelet-check] Initial timeout of 40s passed.
error execution phase kubelet-start: error uploading crisocket: timed out waiting for the condition
To see the stack trace of this error execute with --v=5 or higher
解决方法:
[root@server5 ~]# swapoff -a
[root@server5 ~]# kubeadm reset
[root@server5 ~]# rm /etc/cni/net.d/* -f
[root@server5 ~]# /etc/cni/net.d^C
[root@server5 ~]# systemctl daemon-reload
[root@server5 ~]# systemctl restart kubelet
[root@server5 ~]# iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
再次join:
[root@server5 ~]# kubeadm join 192.168.81.103:6443 --token 1stpn0.u62sireruo1u5hq2 --discovery-token-ca-cert-hash sha256:d0522c56b493fdc4281981aa90afca264a5876798834bbfca5f328ecebe7525f
[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'
[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.
成功
kubeadm init 报错:
Unable to connect to the server: x509: certificate signed by unknown authority
执行reset后再执行init会报错,要先删除$HOME/.kube/config,然后在init后再次执行:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u)😒(id -g) $HOME/.kube/config

浙公网安备 33010602011771号