Skip to content

Commit 24586e4

Browse files
committed
add tips for pod os label: use runtime.GOOS
1 parent 3527ccd commit 24586e4

File tree

1 file changed

+6
-1
lines changed
  • content/en/docs/reference/labels-annotations-taints

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ Example: `kubernetes.io/os: "linux"`
118118

119119
Used on: Node, Pod
120120

121-
The Kubelet populates this with `runtime.GOOS` as defined by Go. This can be handy if you are mixing operating systems in your cluster (for example: mixing Linux and Windows nodes).
121+
For nodes, the kubelet populates this with `runtime.GOOS` as defined by Go. This can be handy if you are
122+
mixing operating systems in your cluster (for example: mixing Linux and Windows nodes).
123+
124+
You can also set this label on a Pod. Kubernetes allows you to set any value for this label;
125+
if you use this label, you should nevertheless set it to the Go `runtime.GOOS` string for the operating
126+
system that this Pod actually works with.
122127

123128
When the `kubernetes.io/os` label value for a Pod does not match the label value on a Node,
124129
the kubelet on the node will not admit the Pod. However, this is not taken into account by

0 commit comments

Comments
 (0)