-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Add an example of how to attach labels to nodes and use nodeSelectors so... #4088
Conversation
Issue #2406 |
@@ -0,0 +1,120 @@ | |||
## Node selection example |
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.
We'd also mention that pinging pod to specific machine using this approach is discouraged. This is a scheduling problem, not something user needs to take care of. The plan is to add more resource type for node, and more resource requirement for pod.
d227e72
to
b06f7e9
Compare
Thanks for the review! I've fixed up everything you mentioned. |
LGTM, personally, I would soften the language around "discouraged" to be something like "generally this is unnecessary, as the scheduler will take care of it for you, but in certain circumstances like ..." |
b06f7e9
to
8ba5a91
Compare
Sounds good, done. |
|
||
### Step One: Attach label to the node | ||
|
||
Run `kubectl get nodes` to get the names of the nodes. Pick out the one that you want to add a label to. Note that label keys must be in the form of DNS labels (as described in the [identifiers doc](/docs/design/identifiers.md), meaning that they are not allowed to contain any upper-case letters. Then run `kubectl get node <node-name> -o yaml > node.yaml`. The contents of the file should look something like this: |
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.
closing paraen
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.
doh! fixed
LGTM one minor comment |
… so that pods can be scheduled on specific nodes.
8ba5a91
to
67b37aa
Compare
Add an example of how to attach labels to nodes and use nodeSelectors so...
... that pods can be scheduled on specific nodes.