From b0df02500f52084eb51ce68617bb9ac1475a7727 Mon Sep 17 00:00:00 2001 From: Rajesh Deshpande Date: Wed, 23 Oct 2019 21:08:17 +0530 Subject: [PATCH] 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 --- .../configure-pod-container/assign-pods-nodes.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/docs/tasks/configure-pod-container/assign-pods-nodes.md b/content/en/docs/tasks/configure-pod-container/assign-pods-nodes.md index 55c5a0754b..5b6b78a536 100644 --- a/content/en/docs/tasks/configure-pod-container/assign-pods-nodes.md +++ b/content/en/docs/tasks/configure-pod-container/assign-pods-nodes.md @@ -19,19 +19,19 @@ Kubernetes cluster. ## 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 - kubectl get nodes + kubectl get nodes --show-labels ``` The output is similar to this: ```shell - NAME STATUS ROLES AGE VERSION - worker0 Ready 1d v1.13.0 - worker1 Ready 1d v1.13.0 - worker2 Ready 1d v1.13.0 + NAME STATUS ROLES AGE VERSION LABELS + worker0 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker0 + worker1 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker1 + worker2 Ready 1d v1.13.0 ...,kubernetes.io/hostname=worker2 ``` 1. Chose one of your nodes, and add a label to it: