k8s部署问题解决
1.如果是安装的flannel,出现kubectl get nodes 显示节点 NoReady
第一可能是flannel的网络问题
runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
master/node点:docker pull quay.io/coreos/flannel:v0.10.0-amd64
master:kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.9.1/Documentation/kube-flannel.yml
node点: mkdir -p /etc/cni/net.d/
node点: 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.224.0.0/16
FLANNEL_SUBNET=10.224.1.0/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true
EOF
现在再从master查看一下吧 kubectl get nodes