Skip to content

Commit d15f23b

Browse files
authored
Merge pull request #51466 from mburke5678/update-infra-nodes
Convert from KCS (L): Infrastructure Nodes in OpenShift 4
2 parents e8d6a06 + e2313b8 commit d15f23b

10 files changed

+159
-23
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,8 @@ Topics:
20712071
# File: nodes-nodes-problem-detector
20722072
- Name: Machine Config Daemon metrics
20732073
File: nodes-nodes-machine-config-daemon-metrics
2074+
- Name: Creating infrastructure nodes
2075+
File: nodes-nodes-creating-infrastructure-nodes
20742076
- Name: Working with containers
20752077
Dir: containers
20762078
Topics:

machine_management/creating-infrastructure-machinesets.adoc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ include::modules/machine-user-provisioned-limitations.adoc[leveloffset=+1]
1111

1212
You can use infrastructure machine sets to create machines that host only infrastructure components, such as the default router, the integrated container image registry, and the components for cluster metrics and monitoring. These infrastructure machines are not counted toward the total number of subscriptions that are required to run the environment.
1313

14+
In a production deployment, it is recommended that you deploy at least three machine sets to hold infrastructure components. Both OpenShift Logging and {SMProductName} deploy Elasticsearch, which requires three instances to be installed on different nodes. Each of these nodes can be deployed to different availability zones for high availability. This configuration requires three different machine sets, one for each availability zone. In global Azure regions that do not have multiple availability zones, you can use availability sets to ensure high availability.
15+
1416
include::modules/infrastructure-components.adoc[leveloffset=+1]
1517

1618
For information about infrastructure nodes and which components can run on infrastructure nodes, see the "Red Hat OpenShift control plane and infrastructure nodes" section in the link:https://www.redhat.com/en/resources/openshift-subscription-sizing-guide[OpenShift sizing and subscription guide for enterprise Kubernetes] document.
1719

20+
To create an infrastructure node, you can xref:../machine_management/creating-infrastructure-machinesets.adoc#machineset-creating_creating-infrastructure-machinesets[use a machine set], xref:../machine_management/creating-infrastructure-machinesets.adoc#creating-an-infra-node_creating-infrastructure-machinesets[label the node], or xref:../machine_management/creating-infrastructure-machinesets.adoc#creating-infra-machines_creating-infrastructure-machinesets[use a machine config pool].
21+
1822
[id="creating-infrastructure-machinesets-production"]
1923
== Creating infrastructure machine sets for production environments
2024

@@ -100,7 +104,26 @@ include::modules/binding-infra-node-workloads-using-taints-tolerations.adoc[leve
100104
[id="moving-resources-to-infrastructure-machinesets"]
101105
== Moving resources to infrastructure machine sets
102106

103-
Some of the infrastructure resources are deployed in your cluster by default. You can move them to the infrastructure machine sets that you created.
107+
Some of the infrastructure resources are deployed in your cluster by default. You can move them to the infrastructure machine sets that you created by adding the infrastructure node selector, as shown:
108+
109+
[source,yaml]
110+
----
111+
spec:
112+
nodePlacement: <1>
113+
nodeSelector:
114+
matchLabels:
115+
node-role.kubernetes.io/infra: ""
116+
tolerations:
117+
- effect: NoSchedule
118+
key: node-role.kubernetes.io/infra
119+
value: reserved
120+
- effect: NoExecute
121+
key: node-role.kubernetes.io/infra
122+
value: reserved
123+
----
124+
<1> Add a `nodeSelector` parameter with the appropriate value to the component you want to move. You can use a `nodeSelector` in the format shown or use `<key>: <value>` pairs, based on the value specified for the node. If you added a taint to the infrasructure node, also add a matching toleration.
125+
126+
Applying a specific node selector to all infrastructure components causes {product-title} to xref:../machine_management/creating-infrastructure-machinesets.adoc#moving-resources-to-infrastructure-machinesets[schedule those workloads on nodes with that label].
104127

105128
include::modules/infrastructure-moving-router.adoc[leveloffset=+2]
106129

modules/infrastructure-components.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//
33
// * machine_management/creating-infrastructure-machinesets.adoc
44
// * post_installation_configuration/cluster-tasks.adoc
5+
// * nodes-nodes-creating-infrastructure-nodes.adoc
56

67
[id="infrastructure-components_{context}"]
78
= {product-title} infrastructure components

modules/infrastructure-moving-logging.adoc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ spec:
4242
nodeCount: 3
4343
nodeSelector: <1>
4444
node-role.kubernetes.io/infra: ''
45+
tolerations:
46+
- effect: NoSchedule
47+
key: node-role.kubernetes.io/infra
48+
value: reserved
49+
- effect: NoExecute
50+
key: node-role.kubernetes.io/infra
51+
value: reserved
4552
redundancyPolicy: SingleRedundancy
4653
resources:
4754
limits:
@@ -57,6 +64,13 @@ spec:
5764
kibana:
5865
nodeSelector: <1>
5966
node-role.kubernetes.io/infra: ''
67+
tolerations:
68+
- effect: NoSchedule
69+
key: node-role.kubernetes.io/infra
70+
value: reserved
71+
- effect: NoExecute
72+
key: node-role.kubernetes.io/infra
73+
value: reserved
6074
proxy:
6175
resources: null
6276
replicas: 1
@@ -65,7 +79,7 @@ spec:
6579
6680
...
6781
----
68-
<1> Add a `nodeSelector` parameter with the appropriate value to the component you want to move. You can use a `nodeSelector` in the format shown or use `<key>: <value>` pairs, based on the value specified for the node.
82+
<1> Add a `nodeSelector` parameter with the appropriate value to the component you want to move. You can use a `nodeSelector` in the format shown or use `<key>: <value>` pairs, based on the value specified for the node. If you added a taint to the infrasructure node, also add a matching toleration.
6983

7084
.Verification
7185

modules/infrastructure-moving-monitoring.adoc

Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@
77
= Moving the monitoring solution
88

99
The monitoring stack includes multiple components, including Prometheus, Thanos Querier, and Alertmanager.
10-
The Cluster Monitoring Operator manages this stack.
11-
To redeploy the monitoring stack to infrastructure nodes, you can create and apply a custom config map.
10+
The Cluster Monitoring Operator manages this stack. To redeploy the monitoring stack to infrastructure nodes, you can create and apply a custom config map.
1211

1312
.Procedure
1413

15-
. Save the following `ConfigMap` definition as the `cluster-monitoring-configmap.yaml` file:
14+
. Edit the `cluster-monitoring-config` config map and change the `nodeSelector` to use the `infra` label:
15+
+
16+
[source,terminal]
17+
----
18+
$ oc edit configmap cluster-monitoring-config -n openshift-monitoring
19+
----
1620
+
1721
[source,yaml]
1822
----
@@ -24,39 +28,87 @@ metadata:
2428
data:
2529
config.yaml: |+
2630
alertmanagerMain:
27-
nodeSelector:
31+
nodeSelector: <1>
2832
node-role.kubernetes.io/infra: ""
33+
tolerations:
34+
- key: node-role.kubernetes.io/infra
35+
value: reserved
36+
effect: NoSchedule
37+
- key: node-role.kubernetes.io/infra
38+
value: reserved
39+
effect: NoExecute
2940
prometheusK8s:
3041
nodeSelector:
3142
node-role.kubernetes.io/infra: ""
43+
tolerations:
44+
- key: node-role.kubernetes.io/infra
45+
value: reserved
46+
effect: NoSchedule
47+
- key: node-role.kubernetes.io/infra
48+
value: reserved
49+
effect: NoExecute
3250
prometheusOperator:
3351
nodeSelector:
3452
node-role.kubernetes.io/infra: ""
53+
tolerations:
54+
- key: node-role.kubernetes.io/infra
55+
value: reserved
56+
effect: NoSchedule
57+
- key: node-role.kubernetes.io/infra
58+
value: reserved
59+
effect: NoExecute
3560
k8sPrometheusAdapter:
3661
nodeSelector:
3762
node-role.kubernetes.io/infra: ""
63+
tolerations:
64+
- key: node-role.kubernetes.io/infra
65+
value: reserved
66+
effect: NoSchedule
67+
- key: node-role.kubernetes.io/infra
68+
value: reserved
69+
effect: NoExecute
3870
kubeStateMetrics:
3971
nodeSelector:
4072
node-role.kubernetes.io/infra: ""
73+
tolerations:
74+
- key: node-role.kubernetes.io/infra
75+
value: reserved
76+
effect: NoSchedule
77+
- key: node-role.kubernetes.io/infra
78+
value: reserved
79+
effect: NoExecute
4180
telemeterClient:
4281
nodeSelector:
4382
node-role.kubernetes.io/infra: ""
83+
tolerations:
84+
- key: node-role.kubernetes.io/infra
85+
value: reserved
86+
effect: NoSchedule
87+
- key: node-role.kubernetes.io/infra
88+
value: reserved
89+
effect: NoExecute
4490
openshiftStateMetrics:
4591
nodeSelector:
4692
node-role.kubernetes.io/infra: ""
93+
tolerations:
94+
- key: node-role.kubernetes.io/infra
95+
value: reserved
96+
effect: NoSchedule
97+
- key: node-role.kubernetes.io/infra
98+
value: reserved
99+
effect: NoExecute
47100
thanosQuerier:
48101
nodeSelector:
49102
node-role.kubernetes.io/infra: ""
103+
tolerations:
104+
- key: node-role.kubernetes.io/infra
105+
value: reserved
106+
effect: NoSchedule
107+
- key: node-role.kubernetes.io/infra
108+
value: reserved
109+
effect: NoExecute
50110
----
51-
+
52-
Running this config map forces the components of the monitoring stack to redeploy to infrastructure nodes.
53-
54-
. Apply the new config map:
55-
+
56-
[source,terminal]
57-
----
58-
$ oc create -f cluster-monitoring-configmap.yaml
59-
----
111+
<1> Add a `nodeSelector` parameter with the appropriate value to the component you want to move. You can use a `nodeSelector` in the format shown or use `<key>: <value>` pairs, based on the value specified for the node. If you added a taint to the infrasructure node, also add a matching toleration.
60112

61113
. Watch the monitoring pods move to the new machines:
62114
+

modules/infrastructure-moving-registry.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ status:
5858
----
5959
$ oc edit configs.imageregistry.operator.openshift.io/cluster
6060
----
61-
62-
. Modify the `spec` section of the object to resemble the following YAML:
6361
+
6462
[source,yaml]
6563
----
@@ -74,9 +72,17 @@ spec:
7472
weight: 100
7573
logLevel: Normal
7674
managementState: Managed
77-
nodeSelector:
75+
nodeSelector: <1>
7876
node-role.kubernetes.io/infra: ""
77+
tolerations:
78+
- effect: NoSchedule
79+
key: node-role.kubernetes.io/infra
80+
value: reserved
81+
- effect: NoExecute
82+
key: node-role.kubernetes.io/infra
83+
value: reserved
7984
----
85+
<1> Add a `nodeSelector` parameter with the appropriate value to the component you want to move. You can use a `nodeSelector` in the format shown or use `<key>: <value>` pairs, based on the value specified for the node. If you added a taint to the infrasructure node, also add a matching toleration.
8086

8187
. Verify the registry pod has been moved to the infrastructure node.
8288
+

modules/infrastructure-moving-router.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,22 @@ status:
5757
$ oc edit ingresscontroller default -n openshift-ingress-operator
5858
----
5959
+
60-
Add the `nodeSelector` stanza that references the `infra` label to the `spec` section, as shown:
61-
+
6260
[source,yaml]
6361
----
6462
spec:
6563
nodePlacement:
6664
nodeSelector:
6765
matchLabels:
6866
node-role.kubernetes.io/infra: ""
69-
----
67+
tolerations:
68+
- effect: NoSchedule
69+
key: node-role.kubernetes.io/infra
70+
value: reserved
71+
- effect: NoExecute
72+
key: node-role.kubernetes.io/infra
73+
value: reserved
74+
----
75+
<1> Add a `nodeSelector` parameter with the appropriate value to the component you want to move. You can use a `nodeSelector` in the format shown or use `<key>: <value>` pairs, based on the value specified for the node. If you added a taint to the infrasructure node, also add a matching toleration.
7076

7177
. Confirm that the router pod is running on the `infra` node.
7278
.. View the list of router pods and note the node name of the running pod:

modules/machine-user-provisioned-limitations.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// * machine_management/deploying-machine-health-checks.adoc
1212
// * machine_management/manually-scaling-machinesets.adoc
1313
// * post_installation_configuration/node-tasks.adoc
14+
// * nodes-nodes-creating-infrastructure-nodes.adoc
1415

1516
[IMPORTANT]
1617
====
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
:_content-type: ASSEMBLY
2+
[id="nodes-nodes-creating-infrastructure-nodes"]
3+
= Creating infrastructure nodes
4+
include::_attributes/common-attributes.adoc[]
5+
:context: creating-infrastructure-nodes
6+
7+
toc::[]
8+
9+
include::modules/machine-user-provisioned-limitations.adoc[leveloffset=+1]
10+
11+
12+
You can use infrastructure machine sets to create machines that host only infrastructure components, such as the default router, the integrated container image registry, and the components for cluster metrics and monitoring. These infrastructure machines are not counted toward the total number of subscriptions that are required to run the environment.
13+
14+
In a production deployment, it is recommended that you deploy at least three machine sets to hold infrastructure components. Both OpenShift Logging and {SMProductName} deploy Elasticsearch, which requires three instances to be installed on different nodes. Each of these nodes can be deployed to different availability zones for high availability. This configuration requires three different machine sets, one for each availability zone. In global Azure regions that do not have multiple availability zones, you can use availability sets to ensure high availability.
15+
16+
include::modules/infrastructure-components.adoc[leveloffset=+1]
17+
18+
For information about infrastructure nodes and which components can run on infrastructure nodes, see the "Red Hat OpenShift control plane and infrastructure nodes" section in the link:https://www.redhat.com/en/resources/openshift-subscription-sizing-guide[OpenShift sizing and subscription guide for enterprise Kubernetes] document.
19+
20+
To create an infrastructure node, you can xref:../../machine_management/creating-infrastructure-machinesets.adoc#machineset-creating_creating-infrastructure-machinesets[use a machine set], xref:../../nodes/nodes/nodes-nodes-creating-infrastructure-nodes.adoc#creating-an-infra-node_creating-infrastructure-nodes[label the node], or xref:../../machine_management/creating-infrastructure-machinesets.adoc#creating-infra-machines_creating-infrastructure-machinesets[use a machine config pool].
21+
22+
include::modules/creating-an-infra-node.adoc[leveloffset=+2]
23+
24+
[role="_additional-resources"]
25+
.Additional resources
26+
27+
* xref:../../machine_management/creating-infrastructure-machinesets.adoc#moving-resources-to-infrastructure-machinesets[Moving resources to infrastructure machine sets]
28+

post_installation_configuration/cluster-tasks.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,11 @@ In a production deployment, it is recommended that you deploy at least three com
521521

522522
For information on infrastructure nodes and which components can run on infrastructure nodes, see xref:../machine_management/creating-infrastructure-machinesets.adoc#creating-infrastructure-machinesets[Creating infrastructure machine sets].
523523

524-
For sample machine sets that you can use with these procedures, see xref:../machine_management/creating-infrastructure-machinesets.adoc#creating-infrastructure-machinesets-clouds[Creating infrastructure machine sets for different clouds].
524+
To create an infrastructure node, you can xref:../post_installation_configuration/cluster-tasks.adoc#machineset-creating_post-install-cluster-tasks[use a machine set], post_installation_configuration/cluster-tasks.adoc#creating-an-infra-node_post-install-cluster-tasks[assign a label to the nodes], or xref:../post_installation_configuration/cluster-tasks.adoc#creating-infra-machines_post-install-cluster-tasks[use a machine config pool].
525+
526+
For sample machine sets that you can use with these procedures, see xref:../machine_management/creating-infrastructure-machinesets.adoc#creating-infrastructure-machinesets-clouds[Creating machine sets for different clouds].
527+
528+
Applying a specific node selector to all infrastructure components causes {product-title} to xref:../post_installation_configuration/cluster-tasks.adoc#moving-resources-to-infrastructure-machinesets[schedule those workloads on nodes with that label].
525529

526530
include::modules/machineset-creating.adoc[leveloffset=+2]
527531

@@ -642,4 +646,3 @@ include::modules/installation-images-samples-disconnected-mirroring-assist.adoc[
642646
include::modules/installation-restricted-network-samples.adoc[leveloffset=+2]
643647

644648
include::modules/installation-preparing-restricted-cluster-to-gather-support-data.adoc[leveloffset=+2]
645-

0 commit comments

Comments
 (0)