1.启动node节点时,
报错: /var/run/containerd/con将主节点中的【/etc/kubernetes/admin.conf】文件拷贝到工作节点相同目录下:tainerd.sock: connect: no such file or directory
解决办法:需要启动containerd服务,systemctl start containerd。
报错:\"unix:///var/run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService"
解决办法:修改/etc/containerd/config.toml文件,disabled_plugins=[""]
2.查看kubeclet状态systemctl status kubelet,发现报错:Unable to register node with API server" err="Post \"https://master001:6443/api/v1/nodes\": dial tcp 192.168.150.111:6443: connect: connection refused" node="master001"
解决办法:重新初始化master
3.报错:The connection to the server localhost:8080 was refused - did you specify the right host or port?
解决方法如下,将主节点中的/etc/kubernetes/admin.conf文件拷贝到工作节点相同目录下
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile
source /etc/profile
4. failed to get sandbox image "registry.k8s.io/pause:3.6"
修改/etc/containerd/config.toml,containerd config default>/etc/containerd/config.tom,修改sandbox_image
sandbox_image = "registry.aliyuncs.com/google_containers/pause:3.6"
systemdCroup=true #原来为false
5.calico无法部署,拉取不到镜像
解决方法,先curl对应版本的yaml文件,然后修改image:quay.io。
如果不行,就docker pull quay.io上的镜像,然后docker tag打标签
6.将普通节点加入master节点时kubeadm join master001:6443 --token 9wofss.uio33occmtu37xen --discovery-token-ca-cert-hash sha256:fc64536c6f990a25265ba7c553a91ea42da0ba0a6393774b53634653e4273792
报错[preflight] Running pre-flight checks
error execution phase preflight: couldn't validate the identity of the API Server: invalid discovery token CA certificate hash: invalid hash "sha256:fc64536c6f990a25265ba7c553a91", expected a 32 byte SHA-256 hash, found 14 bytes,
解决办法:重新在主节点上执行
kubeadm token create --print-join-command