-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update assign-pod-node.md #12159
Update assign-pod-node.md #12159
Conversation
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.
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Deploy preview for kubernetes-io-master-staging ready! Built with commit 58d281f https://deploy-preview-12159--kubernetes-io-master-staging.netlify.com |
@@ -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.If the labels are not displayed completely,you can also use `kubectl describe node "nodename"` to display the labels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just add:
You can also use kubectl describe node "nodename"
to see the full list of labels of the given node.
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Please add a space before the new sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I will add a space.Thx!
/lgtm |
add a space before the new sentence
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: daohu527, tengqm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* 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
Use
kubectl get nodes --show-labels
to show the labels will not show the compelte labels like this:and the command
kubectl describe node "nodename"
will show all labels the node have.Will be a better method to see all labels.