協助改進此頁面
若要為本使用者指南貢獻內容,請點選每個頁面右側面板中的在 GitHub 上編輯此頁面連結。
啟用或停用內建的 NodePool
EKS 自動模式具有兩個內建的 NodePool。您可透過 AWS 主控台、CLI 或 API,來啟用或停用這些 NodePool。
內建的 NodePool 參考
-
system-
此 NodePool 具有
CriticalAddonsOnly污點。CoreDNS 等眾多 EKS 附加元件皆可容忍此污點。藉助此系統節點集區,來分隔叢集關鍵型應用程式。 -
支援
amd64與arm64架構。
-
-
general-purpose-
針對叢集中的一般用途工作負載,此 NodePool 提供啟動節點相關支援。
-
只能使用
amd64架構。
-
兩個內建的 NodePool:
-
使用預設的 EKS NodeClass
-
只能使用隨需 EC2 容量
-
使用 C、M 及 R EC2 執行個體系列
-
要求使用第 5 代或更新版本的 EC2 執行個體
注意
EKS 需要啟用至少一個內建的 NodePool,才能佈建「預設」NodeClass。若停用全部內建的 NodePool,需要建立自訂 NodeClass 及設定 NodePool 才能使用。若要了解 NodeClass 的相關資訊,請參閱 建立 Amazon EKS 的節點類別。
程序
先決條件
透過 CLI AWS 啟用
使用以下命令,啟用兩個內建的 NodePool:
aws eks update-cluster-config \ --name <cluster-name> \ --compute-config '{ "nodeRoleArn": "<node-role-arn>", "nodePools": ["general-purpose", "system"], "enabled": true }' \ --kubernetes-network-config '{ "elasticLoadBalancing":{"enabled": true} }' \ --storage-config '{ "blockStorage":{"enabled": true} }'
您可修改命令,選擇性地啟用 NodePools。
透過 AWS CLI 停用
使用以下命令,停用兩個內建的 NodePool:
aws eks update-cluster-config \ --name <cluster-name> \ --compute-config '{ "enabled": true, "nodePools": [] }' \ --kubernetes-network-config '{ "elasticLoadBalancing":{"enabled": true}}' \ --storage-config '{ "blockStorage":{"enabled": true} }'