k8s错误记录
error execution phase preflight: couldn’t validate the identity of the API Server: Get https://192.168.152.126:6443/…/timeout=10s: dial tcp 192.168.152.126:6443: connect: no route to host1.回到kubernees
error execution phase preflight: couldn’t validate the identity of the API Server: Get https://192.168.152.126:6443/…/timeout=10s: dial tcp 192.168.152.126:6443: connect: no route to host
1.回到kubernees-maser 依次输入列命令
systemctl stop kubelet
systemctl stop docker
iptables --flush
iptables -tnat --flush
systemctl start kubelet
systemctl start docker
2.重新生成新token
在kubernetse-master重新生成token:
kubeadm token create
424mp7.nkxx07p940mkl2nd
openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed ‘s/^.* //’
d88fb55cb1bd659023b11e61052b39bbfe99842b0636574a16c76df186fd5e0d
3.在kubernetes-slave中执行此命令 join就成功了
kubeadm join 192.168.169.21:6443 –token 424mp7.nkxx07p940mkl2nd \ --discovery-token-ca-cert-hash sha256:d88fb55cb1bd659023b11e61052b39bbfe99842b0636574a16c76df186fd5e0d
4.解决k8s集群在节点运行kubectl出现的错误:The connection to the server localhost:8080 was refused - did you specify the right host or port?
将主节点(master节点)中的【/etc/kubernetes/admin.conf】文件拷贝到从节点相同目录下
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile
source ~/.bash_profile
更多推荐
所有评论(0)