add tips for pod os label: use runtime.GOOS

pull/40332/head
Paco Xu 2023-03-28 15:48:44 +08:00
parent 3527ccd558
commit 24586e49e7
1 changed files with 6 additions and 1 deletions

View File

@ -118,7 +118,12 @@ Example: `kubernetes.io/os: "linux"`
Used on: Node, Pod
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).
For nodes, 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).
You can also set this label on a Pod. Kubernetes allows you to set any value for this label;
if you use this label, you should nevertheless set it to the Go `runtime.GOOS` string for the operating
system that this Pod actually works with.
When the `kubernetes.io/os` label value for a Pod does not match the label value on a Node,
the kubelet on the node will not admit the Pod. However, this is not taken into account by