mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
71 lines
2.9 KiB
Plaintext
71 lines
2.9 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * post_installation_configuration/cluster-tasks.adoc
|
|
// * machine_management/creating-infrastructure-machinesets.adoc
|
|
// * nodes/nodes/nodes-nodes-creating-infrastructure-nodes.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="creating-an-infra-node_{context}"]
|
|
= Creating an infrastructure node
|
|
|
|
[IMPORTANT]
|
|
====
|
|
See Creating infrastructure machine sets for installer-provisioned infrastructure environments or for any cluster where the control plane nodes are managed by the machine API.
|
|
====
|
|
|
|
Requirements of the cluster dictate that infrastructure (infra) nodes, be provisioned. The installation program provisions only control plane and worker nodes. Worker nodes can be designated as infrastructure nodes through labeling. You can then use taints and tolerations to move appropriate workloads to the infrastructure nodes. For more information, see "Moving resources to infrastructure machine sets".
|
|
|
|
You can optionally create a default cluster-wide node selector. The default node selector is applied to pods created in all namespaces and creates an intersection with any existing node selectors on a pod, which additionally constrains the pod's selector.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
If the default node selector key conflicts with the key of a pod's label, then the default node selector is not applied.
|
|
|
|
However, do not set a default node selector that might cause a pod to become unschedulable. For example, setting the default node selector to a specific node role, such as `node-role.kubernetes.io/infra=""`, when a pod's label is set to a different node role, such as `node-role.kubernetes.io/master=""`, can cause the pod to become unschedulable. For this reason, use caution when setting the default node selector to specific node roles.
|
|
|
|
You can alternatively use a project node selector to avoid cluster-wide node selector key conflicts.
|
|
====
|
|
|
|
.Procedure
|
|
|
|
. Add a label to the worker nodes that you want to act as infrastructure nodes:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc label node <node-name> node-role.kubernetes.io/infra=""
|
|
----
|
|
|
|
. Check to see if applicable nodes now have the `infra` role:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get nodes
|
|
----
|
|
|
|
. Optional: Create a default cluster-wide node selector:
|
|
|
|
.. Edit the `Scheduler` object:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc edit scheduler cluster
|
|
----
|
|
|
|
.. Add the `defaultNodeSelector` field with the appropriate node selector:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: config.openshift.io/v1
|
|
kind: Scheduler
|
|
metadata:
|
|
name: cluster
|
|
spec:
|
|
defaultNodeSelector: node-role.kubernetes.io/infra="" <1>
|
|
# ...
|
|
----
|
|
<1> This example node selector deploys pods on infrastructure nodes by default.
|
|
|
|
.. Save the file to apply the changes.
|
|
|
|
You can now move infrastructure resources to the new infrastructure nodes. Also, remove any workloads that you do not want, or that do not belong, on the new infrastructure node. See the list of workloads supported for use on infrastructure nodes in "{product-title} infrastructure components".
|