赞
踩
kubectl describe pod
命令,发现了如下报错0/4 nodes are available: 1 node(s) had taint {node.kubernetes.io/disk-pressure: }, that the pod didn't tolerate, 3 node(s) didn't match node selector.
node selector
,和 node
的 label
做了绑定,因此,导致了pod没有节点可以起来)Linux:~ # kubectl get nodes -o json | jq '.items[].spec'
{}
{}
{
"taints": [
{
"effect": "NoSchedule",
"key": "node.kubernetes.io/disk-pressure",
"timeAdded": "2021-03-06T14:15:27Z"
}
]
}
{}
NoSchedule
,不可调度node.kubernetes.io/disk-pressure
这个名称的污点Linux:~ # kubectl taint nodes --all node.kubernetes.io/disk-pressure-
node/k8s-w1 untainted
taint "node.kubernetes.io/disk-pressure" not found
taint "node.kubernetes.io/disk-pressure" not found
taint "node.kubernetes.io/disk-pressure" not found
kubectl apply -f xxx.yaml
即可(如果 pod 有 deployment ,则直接 kubectl delete pod
即可)kubectl describe pod
查看报错的原因Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。