Skip to content

Commit f80c848

Browse files
authored
Merge pull request #49360 from Aaina26/update_node_role_in_docs
Updated node roles in docs
2 parents a710929 + dca9071 commit f80c848

File tree

2 files changed

+21
-0
lines changed
  • content/en/docs

2 files changed

+21
-0
lines changed

content/en/docs/concepts/architecture/nodes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ When you want to create Node objects manually, set the kubelet flag `--register-
140140
You can modify Node objects regardless of the setting of `--register-node`.
141141
For example, you can set labels on an existing Node or mark it unschedulable.
142142

143+
You can set optional node role(s) for nodes by adding one or more `node-role.kubernetes.io/<role>: <role>` labels to the node where characters of `<role>`
144+
are limited by the [syntax](/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set) rules for labels.
145+
146+
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.
147+
143148
You can use labels on Nodes in conjunction with node selectors on Pods to control
144149
scheduling. For example, you can constrain a Pod to only be eligible to run on
145150
a subset of the available nodes.

content/en/docs/reference/labels-annotations-taints/_index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,6 +2735,22 @@ only onto these nodes, or to avoid running Pods on the control plane.
27352735
If this label is set, the [EndpointSlice controller](/docs/concepts/services-networking/topology-aware-routing/#implementation-control-plane)
27362736
ignores that node while calculating Topology Aware Hints.
27372737

2738+
### node-role.kubernetes.io/*
2739+
2740+
Type: Label
2741+
2742+
Example: `node-role.kubernetes.io/gpu: gpu`
2743+
2744+
Used on: Node
2745+
2746+
This optional label is applied to a node when you want to mark a node role.
2747+
The node role (text following `/` in the label key) can be set, as long as the overall key follows the
2748+
[syntax](/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set) rules for
2749+
object labels.
2750+
2751+
Kubernetes defines one specific node role, **control-plane**. A label you can use to mark that node
2752+
role is [`node-role.kubernetes.io/control-plane`](#node-role-kubernetes-io-control-plane).
2753+
27382754
### node-role.kubernetes.io/control-plane {#node-role-kubernetes-io-control-plane-taint}
27392755

27402756
Type: Taint

0 commit comments

Comments
 (0)