Taint and toleration
来源:5-1 创建Nginx Pod

爱滑板的小菜鸡
2021-09-07
在刚create nginx yaml的pod时候,遇到了这个error
3 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn’t tolerate.
这个是因为在三个node(master, node1, node2) 里面,没有把toleration 容错率的config remove掉。
可以通过下面这个command to remove
- 首先 kubectl describe node node1 | grep Taints 查看node1 节点的taints config
如果返回 Taints: node-role.kubernetes.io/master:NoSchedule
说明当前的node taints key是node-role.kubernetes.io/master。 default value is NoSchedule - 可以运行 “kubectl taint nodes node1 key1=value1:NoSchedule-” 把这个config remove掉
- 之后相当于当前那个node1 就是available,可以schedule到那个node上面。
- 相应的“kubectl taint nodes node1 key1=value1:NoSchedule“ 命令行可以用于加载上这个taints config
写回答
1回答
-
爱滑板的小菜鸡
提问者
2021-09-07
00
相似问题