From bd3bc61115fb67d6a6b6429faf517bfcb236b1fb Mon Sep 17 00:00:00 2001 From: zero Date: Sun, 13 Jan 2019 16:52:46 +0800 Subject: [PATCH] Update assign-pod-node.md (#12159) * Update assign-pod-node.md Use `kubectl get nodes --show-labels` to show the labels will not show the compelte labels like this: ``` root@master:/home# kubectl get nodes --show-labels NAME STATUS ROLES AGE VERSION LABELS master Ready master 41h v1.13.1 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/hostname=master,node-role.kubernetes.io/master= server01 Ready 41h v1.13.1 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,func=database,kubernetes.io/hostname=moon-server01 ``` and the command `kubectl describe node "nodename" ` will show all labels the node have. * Update assign-pod-node.md * Update assign-pod-node.md add a space before the new sentence --- content/en/docs/concepts/configuration/assign-pod-node.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/concepts/configuration/assign-pod-node.md b/content/en/docs/concepts/configuration/assign-pod-node.md index 468ca73303..abf460d2c3 100644 --- a/content/en/docs/concepts/configuration/assign-pod-node.md +++ b/content/en/docs/concepts/configuration/assign-pod-node.md @@ -46,7 +46,7 @@ Run `kubectl get nodes` to get the names of your cluster's nodes. Pick out the o If this fails with an "invalid command" error, you're likely using an older version of kubectl that doesn't have the `label` command. In that case, see the [previous version](https://github.com/kubernetes/kubernetes/blob/a053dbc313572ed60d89dae9821ecab8bfd676dc/examples/node-selection/README.md) of this guide for instructions on how to manually set labels on a node. -You can verify that it worked by re-running `kubectl get nodes --show-labels` and checking that the node now has a label. +You can verify that it worked by re-running `kubectl get nodes --show-labels` and checking that the node now has a label. You can also use `kubectl describe node "nodename"` to see the full list of labels of the given node. ### Step Two: Add a nodeSelector field to your pod configuration