Open llhuii opened 3 years ago
所以kind创建名为kindnet(用于配置cni和更新路由规则的网络插件)的daemonset pod template存在
spec:
template:
spec:
tolerations:
- effect: NoSchedule
operator: Exists
表示可以容忍到任意打了NoSchedule污点的节点
节点的污点除了kubectl taint
打, 还包括:
kubectl cordon
, 节点新增以下状态:
taints:
- effect: NoSchedule
key: node.kubernetes.io/unschedulable
timeAdded: "2021-06-05T16:40:35Z"
unschedulable: true
code.k8s.io/pkg/controller/nodelifecycle/node_lifecycle_controller.go 会给节点打上以下污点:
https://kubernetes.io/zh/docs/concepts/scheduling-eviction/taint-and-toleration/
kubectl taint nodes node1 key1=value1:NoSchedule
容忍度和污点不匹配的条件:
代码:
匹配规则: code.k8s.io/vendor/k8s.io/api/core/v1/toleration.go