Modifying adding label to node steps (#16993)
* Modifying adding label to node steps Existing steps does not show what labels the node has before adding a new label. So I have changed the command to list out node along with their labels before adding any new label. This will help first-time readers to understand existing labels and then how we can add a new label and display it. * Update content/en/docs/tasks/configure-pod-container/assign-pods-nodes.md Co-Authored-By: Tim Bannister <tim@scalefactory.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
18ee7f8d94
commit
b0df02500f
@@ -19,19 +19,19 @@ Kubernetes cluster.
|
|||||||
|
|
||||||
## Add a label to a node
|
## Add a label to a node
|
||||||
|
|
||||||
1. List the nodes in your cluster:
|
1. List the nodes in your cluster, along with their labels:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl get nodes
|
kubectl get nodes --show-labels
|
||||||
```
|
```
|
||||||
|
|
||||||
The output is similar to this:
|
The output is similar to this:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
NAME STATUS ROLES AGE VERSION
|
NAME STATUS ROLES AGE VERSION LABELS
|
||||||
worker0 Ready <none> 1d v1.13.0
|
worker0 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker0
|
||||||
worker1 Ready <none> 1d v1.13.0
|
worker1 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker1
|
||||||
worker2 Ready <none> 1d v1.13.0
|
worker2 Ready <none> 1d v1.13.0 ...,kubernetes.io/hostname=worker2
|
||||||
```
|
```
|
||||||
1. Chose one of your nodes, and add a label to it:
|
1. Chose one of your nodes, and add a label to it:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user