一般來說,是無法佈署應用程式到 Control plane 上的,主要是要讓 Control plane 的資源儘量不受到排擠。這是因為 node 用了 annotation/taint 方式來做標記,這樣 scheduler 才知道這些 node 是不能放 pod 的。
在資源不夠的情況下,會想儘可能使用到所有 node 資源。這時候可以透過以下方式來處理
# Source - https://stackoverflow.com/a/72264143
# Posted by TheDHM, modified by community. See post 'Timeline' for change history
# Retrieved 2026-09-02, License - CC BY-SA 4.0
kubectl taint node <master-node> node-role.kubernetes.io/control-plane:NoSchedule-
kubectl taint node <master-node> node-role.kubernetes.io/master:NoSchedule-
要注意的地方,請先用 kubectl describe node來查看 taint 是打上哪一個,再看用哪一個指令。
參考資料: