先查看是不是hostname的问题 hostname设置混乱也会导致的
本人配置
#node1 机器上执行
hostnamectl set-hostname node1
#node2 机器上执行
hostnamectl set-hostname node2
#master 机器上执行
hostnamectl set-hostname master
#每台机子上的hosts文件
vim /etc/hosts
192.168.0.158 master
192.168.0.159 node1
192.168.0.160 node2
然后查看版本,在kubernetesji集群从1.16.x版本升级到1.17.x版本地时候报错:
Failed to initialize CSINode: error updating CSINode annotation: timed out waiting for the condition; caused by: the server could not find the requested resource
编辑配置文件/var/lib/kubelet/config.yaml,在其追加以下配置:
featureGates:
CSIMigration: false
重启服务
systemctl daemon-reload
systemctl restart kubelet
如果是使用flannel插件,在notready机子上执行
mkdir -p /etc/cni/net.d/
cat <<EOF> /etc/cni/net.d/10-flannel.conf
{"name":"cbr0","type":"flannel","delegate": {"isDefaultGateway": true}}
EOF
mkdir /usr/share/oci-umount/oci-umount.d -p
mkdir /run/flannel/
cat <<EOF> /run/flannel/subnet.env
FLANNEL_NETWORK=10.244.0.0/16
FLANNEL_SUBNET=10.244.0.1/24
FLANNEL_MTU=1400
FLANNEL_IPMASQ=true
EOF
重启服务
systemctl daemon-reload
systemctl restart kubelet








网友评论