企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
给所有master taint ,禁止所有pod 运行在master 节点。 kubectl taint nodes dl-demo-k8s-master-01 node.kubernetes.io=unschedulable:NoSchedule kubectl taint nodes dl-demo-k8s-master-02 node.kubernetes.io=unschedulable:NoSchedule kubectl taint nodes dl-demo-k8s-master-03 node.kubernetes.io=unschedulable:NoSchedule master kubectl taint nodes k8s-master03.ali.jccfc.io node-role.kubernetes.io/master=unschedulable:NoSchedule 删除 taint 规则 kubectl taint node --all node.kubernetes.io:NoSchedule- 给一个 Deployment 添加 tolerations 策略允许 在污染节点创建pod. spec: tolerations: - key: "node.kubernetes.io" effect: "NoSchedule" value: "unschedulable" operator: "Equal" [参考链接:Kubernetes之Taints与Tolerations 污点和容忍](https://cloud.tencent.com/info/21f27eb131873f979d6275f085dfabdc.html)