kubernetes增加污點,達到pod是否能在做節點運行


master node參與工作負載 (只在主節點執行)
使用kubeadm初始化的集群,出於安全考慮Pod不會被調度到Master Node上,也就是說Master Node不參與工作負載。

這里搭建的是測試環境可以使用下面的命令使Master Node參與工作負載:
k8s是master節點的hostname
允許master節點部署pod,使用命令如下:

kubectl taint nodes --all node-role.kubernetes.io/master-
1
輸出如下:

node "k8s" untainted
1
輸出error: taint “node-role.kubernetes.io/master:” not found錯誤忽略。

禁止master部署pod

kubectl taint nodes k8s node-role.kubernetes.io/master=true:NoSchedule


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM