From 1ebc2224829c318a17e952ed50c28a0b314cbb0e Mon Sep 17 00:00:00 2001 From: Eason1118 <1084430062@qq.com> Date: Tue, 18 Feb 2025 09:01:07 +0700 Subject: [PATCH] [zh-cn] sync architecture/nodes.md --- .../zh-cn/docs/concepts/architecture/nodes.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/content/zh-cn/docs/concepts/architecture/nodes.md b/content/zh-cn/docs/concepts/architecture/nodes.md index 6757c72bb0..d693a6a41b 100644 --- a/content/zh-cn/docs/concepts/architecture/nodes.md +++ b/content/zh-cn/docs/concepts/architecture/nodes.md @@ -246,6 +246,12 @@ When you want to create Node objects manually, set the kubelet flag `--register- You can modify Node objects regardless of the setting of `--register-node`. For example, you can set labels on an existing Node or mark it unschedulable. + +You can set optional node role(s) for nodes by adding one or more +`node-role.kubernetes.io/: ` labels to the node where characters of `` are limited by the +[syntax](/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set) rules for labels. + +Kubernetes ignores the label value for node roles; by convention, you can set it to the same string you used for the node role in the label key. --> ### 手动节点管理 {#manual-node-administration} @@ -257,6 +263,12 @@ For example, you can set labels on an existing Node or mark it unschedulable. 你可以修改 Node 对象(忽略 `--register-node` 设置)。 例如,你可以修改节点上的标签或并标记其为不可调度。 +你可以通过在节点上添加一个或多个 `node-role.kubernetes.io/: ` 标签, +来为节点设置可选的节点角色。其中,`` +的字符受[标签键名格式](/zh-cn/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set)规则限制。 + +Kubernetes 会忽略节点角色标签的值;按照惯例,你可以将其设置为与标签键中的 `` 相同的字符串。 +