Skip to content

Commit

Permalink
Update assign-pod-node.md (#12159)
Browse files Browse the repository at this point in the history
* 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    <none>   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
  • Loading branch information
daohu527 authored and k8s-ci-robot committed Jan 13, 2019
1 parent 6b90b6c commit bd3bc61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/en/docs/concepts/configuration/assign-pod-node.md
Expand Up @@ -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

Expand Down

0 comments on commit bd3bc61

Please sign in to comment.