|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * nodes/clusters/nodes-cluster-overcommit.adoc |
| 4 | +// * machine_management/creating-infrastructure-machinesets.adoc |
| 5 | + |
| 6 | +ifeval::["{context}" == "nodes-cluster-overcommit"] |
| 7 | +:cro: |
| 8 | +endif::[] |
| 9 | + |
| 10 | +:_mod-docs-content-type: PROCEDURE |
| 11 | +[id="nodes-cluster-resource-override-move-infra_{context}"] |
| 12 | += Moving the Cluster Resource Override Operator pods |
| 13 | + |
| 14 | +By default, the Cluster Resource Override Operator installation process creates an Operator pod and two Cluster Resource Override pods on nodes in the `clusterresourceoverride-operator` namespace. You can move these pods to other nodes, such as infrastructure nodes, as needed. |
| 15 | + |
| 16 | +ifdef::cro[] |
| 17 | +You can create and use infrastructure nodes to host only infrastructure components, such as the default router, the integrated container image registry, and the components for cluster metrics and monitoring. These infrastructure nodes are not counted toward the total number of subscriptions that are required to run the environment. For more information about infrastructure nodes, see "Creating infrastructure machine sets". |
| 18 | +endif::cro[] |
| 19 | + |
| 20 | +The following examples shows the Cluster Resource Override pods are deployed to control plane nodes and the Cluster Resource Override Operator pod is deployed to a worker node. |
| 21 | + |
| 22 | +.Example Cluster Resource Override pods |
| 23 | +[source,terminal] |
| 24 | +---- |
| 25 | +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES |
| 26 | +clusterresourceoverride-786b8c898c-9wrdq 1/1 Running 0 23s 10.128.2.32 ip-10-0-14-183.us-west-2.compute.internal <none> <none> |
| 27 | +clusterresourceoverride-786b8c898c-vn2lf 1/1 Running 0 26s 10.130.2.10 ip-10-0-20-140.us-west-2.compute.internal <none> <none> |
| 28 | +clusterresourceoverride-operator-6b8b8b656b-lvr62 1/1 Running 0 56m 10.131.0.33 ip-10-0-2-39.us-west-2.compute.internal <none> <none> |
| 29 | +---- |
| 30 | + |
| 31 | +.Example node list |
| 32 | +[source,terminal] |
| 33 | +---- |
| 34 | +NAME STATUS ROLES AGE VERSION |
| 35 | +ip-10-0-14-183.us-west-2.compute.internal Ready control-plane,master 65m v1.30.4 |
| 36 | +ip-10-0-2-39.us-west-2.compute.internal Ready worker 58m v1.30.4 |
| 37 | +ip-10-0-20-140.us-west-2.compute.internal Ready control-plane,master 65m v1.30.4 |
| 38 | +ip-10-0-23-244.us-west-2.compute.internal Ready infra 55m v1.30.4 |
| 39 | +ip-10-0-77-153.us-west-2.compute.internal Ready control-plane,master 65m v1.30.4 |
| 40 | +ip-10-0-99-108.us-west-2.compute.internal Ready worker 24m v1.30.4 |
| 41 | +ip-10-0-24-233.us-west-2.compute.internal Ready infra 55m v1.30.4 |
| 42 | +ip-10-0-88-109.us-west-2.compute.internal Ready worker 24m v1.30.4 |
| 43 | +ip-10-0-67-453.us-west-2.compute.internal Ready infra 55m v1.30.4 |
| 44 | +---- |
| 45 | + |
| 46 | +.Procedure |
| 47 | + |
| 48 | +. Move the Cluster Resource Override Operator pod by adding a node selector to the `Subscription` custom resource (CR) for the Cluster Resource Override Operator. |
| 49 | + |
| 50 | +.. Edit the CR: |
| 51 | ++ |
| 52 | +[source,terminal] |
| 53 | +---- |
| 54 | +$ oc edit -n clusterresourceoverride-operator subscriptions.operators.coreos.com clusterresourceoverride |
| 55 | +---- |
| 56 | + |
| 57 | +.. Add a node selector to match the node role label on the node where you want to install the Cluster Resource Override Operator pod: |
| 58 | ++ |
| 59 | +[source,terminal] |
| 60 | +---- |
| 61 | +apiVersion: operators.coreos.com/v1alpha1 |
| 62 | +kind: Subscription |
| 63 | +metadata: |
| 64 | + name: clusterresourceoverride |
| 65 | + namespace: clusterresourceoverride-operator |
| 66 | +# ... |
| 67 | +spec: |
| 68 | + config: |
| 69 | + nodeSelector: |
| 70 | + node-role.kubernetes.io/infra: "" <1> |
| 71 | +# ... |
| 72 | +---- |
| 73 | +<1> Specify the role of the node where you want to deploy the Cluster Resource Override Operator pod. |
| 74 | ++ |
| 75 | +[NOTE] |
| 76 | +==== |
| 77 | +If the infra node uses taints, you need to add a toleration to the `Subscription` CR. |
| 78 | + |
| 79 | +For example: |
| 80 | + |
| 81 | +[source,terminal] |
| 82 | +---- |
| 83 | +apiVersion: operators.coreos.com/v1alpha1 |
| 84 | +kind: Subscription |
| 85 | +metadata: |
| 86 | + name: clusterresourceoverride |
| 87 | + namespace: clusterresourceoverride-operator |
| 88 | +# ... |
| 89 | +spec: |
| 90 | + config: |
| 91 | + nodeSelector: |
| 92 | + node-role.kubernetes.io/infra: "" |
| 93 | + tolerations: <1> |
| 94 | + - key: "node-role.kubernetes.io/infra" |
| 95 | + operator: "Exists" |
| 96 | + effect: "NoSchedule" |
| 97 | +---- |
| 98 | +<1> Specifies a toleration for a taint on the infra node. |
| 99 | +==== |
| 100 | + |
| 101 | +. Move the Cluster Resource Override pods by adding a node selector to the `ClusterResourceOverride` custom resource (CR): |
| 102 | + |
| 103 | +.. Edit the CR: |
| 104 | ++ |
| 105 | +[source,terminal] |
| 106 | +---- |
| 107 | +$ oc edit ClusterResourceOverride cluster -n clusterresourceoverride-operator |
| 108 | +---- |
| 109 | + |
| 110 | +.. Add a node selector to match the node role label on the infra node: |
| 111 | ++ |
| 112 | +[source,terminal] |
| 113 | +---- |
| 114 | +apiVersion: operator.autoscaling.openshift.io/v1 |
| 115 | +kind: ClusterResourceOverride |
| 116 | +metadata: |
| 117 | + name: cluster |
| 118 | + resourceVersion: "37952" |
| 119 | +spec: |
| 120 | + podResourceOverride: |
| 121 | + spec: |
| 122 | + cpuRequestToLimitPercent: 25 |
| 123 | + limitCPUToMemoryPercent: 200 |
| 124 | + memoryRequestToLimitPercent: 50 |
| 125 | + deploymentOverrides: |
| 126 | + replicas: 1 <1> |
| 127 | + nodeSelector: |
| 128 | + node-role.kubernetes.io/infra: "" <2> |
| 129 | +# ... |
| 130 | +---- |
| 131 | +<1> Optional: Specify the number of Cluster Resource Override pods to deploy. The default is `2`. Only one pod is allowed per node. |
| 132 | +<2> Optional: Specify the role of the node where you want to deploy the Cluster Resource Override pods. |
| 133 | ++ |
| 134 | +[NOTE] |
| 135 | +==== |
| 136 | +If the infra node uses taints, you need to add a toleration to the `ClusterResourceOverride` CR. |
| 137 | + |
| 138 | +For example: |
| 139 | + |
| 140 | +[source,terminal] |
| 141 | +---- |
| 142 | +apiVersion: operator.autoscaling.openshift.io/v1 |
| 143 | +kind: ClusterResourceOverride |
| 144 | +metadata: |
| 145 | + name: cluster |
| 146 | +# ... |
| 147 | +spec: |
| 148 | + podResourceOverride: |
| 149 | + spec: |
| 150 | + memoryRequestToLimitPercent: 50 |
| 151 | + cpuRequestToLimitPercent: 25 |
| 152 | + limitCPUToMemoryPercent: 200 |
| 153 | + deploymentOverrides: |
| 154 | + replicas: 3 |
| 155 | + nodeSelector: |
| 156 | + node-role.kubernetes.io/worker: "" |
| 157 | + tolerations: <1> |
| 158 | + - key: "key" |
| 159 | + operator: "Equal" |
| 160 | + value: "value" |
| 161 | + effect: "NoSchedule" |
| 162 | +---- |
| 163 | +<1> Specifies a toleration for a taint on the infra node. |
| 164 | +==== |
| 165 | + |
| 166 | +.Verification |
| 167 | + |
| 168 | +* You can verify that the pods have moved by using the following command: |
| 169 | ++ |
| 170 | +[source,terminal] |
| 171 | +---- |
| 172 | +$ oc get pods -n clusterresourceoverride-operator -o wide |
| 173 | +---- |
| 174 | ++ |
| 175 | +The Cluster Resource Override pods are now deployed to the infra nodes. |
| 176 | ++ |
| 177 | +.Example output |
| 178 | +[source,terminal] |
| 179 | +---- |
| 180 | +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES |
| 181 | +clusterresourceoverride-786b8c898c-9wrdq 1/1 Running 0 23s 10.127.2.25 ip-10-0-23-244.us-west-2.compute.internal <none> <none> |
| 182 | +clusterresourceoverride-786b8c898c-vn2lf 1/1 Running 0 26s 10.128.0.80 ip-10-0-24-233.us-west-2.compute.internal <none> <none> |
| 183 | +clusterresourceoverride-operator-6b8b8b656b-lvr62 1/1 Running 0 56m 10.129.0.71 ip-10-0-67-453.us-west-2.compute.internal <none> <none> |
| 184 | +---- |
| 185 | +
|
| 186 | +ifeval::["{context}" == "nodes-pods-vertical-autoscaler"] |
| 187 | +:!cro: |
| 188 | +endif::[] |
0 commit comments