OpenShift Node Selector Operations: Difference between revisions
Jump to navigation
Jump to search
Line 26: | Line 26: | ||
oc edit namespace ''<my-project>'' | oc edit namespace ''<my-project>'' | ||
... | ... | ||
metadata: | metadata: |
Revision as of 04:45, 6 July 2017
Internal
Overview
Operations to manipulate node selectors.
Configuring a Cluster-Wide Default Node Selector
Sets up a cluster-wide default node selector.
Configuring a Per-Project Node Selector
The per-project node selector can be set up when the project is created:
oadm new-project <project-name> --node-selector='keyA=valueA,keyB=valueB'
More details in:
The node selector can be added after the project was created by editing the namespace metadata with oc edit:
oc edit namespace <my-project>
... metadata: annotations: openshift.io/node-selector: "env=infra" ...
Edit the "namespace", and not the "project", if attempting to edit the project you will get an error message saying that the field is immutable.