解决方案

NFS 共享出现有坏的超级块

yum -y install nfs-utils
systemctl start nfs-utils
systemctl enable nfs-utils

Unable to connect to the server: x509

如果主节点提示:

Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")

这是由于启动 k8s 后忘记了后续操作, 执行以下命令即可

mkdir -p $HOME/.kube
sudo \cp /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

node(s) had taints

错误提示:

3 node(s) had taints that the pod didn't tolerate,

直译意思是节点有了污点无法容忍,执行 kubectl get no -o yaml | grep taint -A 5 之后发现该节点是不可调度的。这是因为 kubernetes 出于安全考虑默认情况下无法在 master 节点上部署 pod,于是用下面方法解决:

kubectl taint nodes --all node-role.kubernetes.io/master-

node(s) didn't match node selector

错误提示:

4 node(s) didn't match node selector

如果指定的 label 在所有 node 上都无法匹配,则创建 Pod 失败,会提示无法调度

解决方案: 为 node 打标签

kubectl label nodes <node-name> <label-key>=<label-value>

参考资料

MIT Licensed | Copyright © 2018-present 滇ICP备16006294号

Design by Quanzaiyu | Power by VuePress