Skip to content

Commit e5dede1

Browse files
committed
Added creating infra node content
1 parent f845789 commit e5dede1

File tree

3 files changed

+170
-0
lines changed

3 files changed

+170
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * post_installation_configuration/cluster-tasks.adoc
4+
5+
[id="creating-an-infra-node_{context}"]
6+
= Creating an infrastructure node
7+
8+
[IMPORTANT]
9+
====
10+
See Creating infrastructure machine sets for installer-provisioned infrastructure environments or for any cluster where the master nodes are managed by the machine API.
11+
====
12+
13+
Requirements of the cluster dictate that infrastructure, also called `infra` nodes, be provisioned. The installer only provides provisions for master and worker nodes. Worker nodes can be designated as infrastructure nodes or application, also called `app`, nodes through labeling.
14+
15+
.Procedure
16+
17+
. Add a label to the worker node that you want to act as application node:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc label node <node-name> node-role.kubernetes.io/app=""
22+
----
23+
24+
. Add a label to the worker nodes that you want to act as infrastructure nodes:
25+
+
26+
[source,terminal]
27+
----
28+
$ oc label node <node-name> node-role.kubernetes.io/infra=""
29+
----
30+
31+
. Check to see if applicable nodes now have the `infra` role and `app` roles:
32+
+
33+
[source,terminal]
34+
----
35+
$ oc get nodes
36+
----
37+
38+
. Create a default node selector so that pods without a node selector are assigned a subset of nodes to be deployed on, for example by default deployment in worker nodes. As an example, the `defaultNodeSelector` to deploy pods on worker nodes by default would look like:
39+
+
40+
[source,yaml]
41+
----
42+
defaultNodeSelector: node-role.kubernetes.io/app=
43+
----
44+
45+
. Move infrastructure resources to the newly labeled `infra` nodes.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * post_installation_configuration/cluster-tasks.adoc
4+
5+
[id="creating-infra-machines_{context}"]
6+
= Creating infrastructure machines
7+
8+
If you need infrastructure machines to have dedicated configurations, then you must create an infra pool.
9+
10+
.Procedure
11+
12+
. Create a machine config pool that contains both the worker role and your custom role as machine config selector:
13+
+
14+
[source,terminal]
15+
----
16+
$ cat infra.mcp.yaml
17+
----
18+
+
19+
.Example output
20+
[source,yaml]
21+
----
22+
apiVersion: machineconfiguration.openshift.io/v1
23+
kind: MachineConfigPool
24+
metadata:
25+
name: infra
26+
spec:
27+
machineConfigSelector:
28+
matchExpressions:
29+
- {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,infra]}
30+
nodeSelector:
31+
matchLabels:
32+
node-role.kubernetes.io/infra: ""
33+
----
34+
35+
. After you have the YAML file, you can create the machine config pool:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc create -f infra.mcp.yaml
40+
----
41+
42+
. Check the machine configs to ensure that the infrastructure configuration rendered successfully:
43+
+
44+
[source,terminal]
45+
----
46+
$ oc get machineconfig
47+
----
48+
+
49+
.Example output
50+
[source,terminal]
51+
----
52+
NAME GENERATEDBYCONTROLLER IGNITIONVERSION CREATED
53+
00-master 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 31d
54+
00-worker 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 31d
55+
01-master-container-runtime 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 31d
56+
01-master-kubelet 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 31d
57+
01-worker-container-runtime 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 31d
58+
01-worker-kubelet 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 31d
59+
99-master-1ae2a1e0-a115-11e9-8f14-005056899d54-registries 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 31d
60+
99-master-ssh 2.2.0 31d
61+
99-worker-1ae64748-a115-11e9-8f14-005056899d54-registries 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 31d
62+
99-worker-ssh 2.2.0 31d
63+
rendered-infra-4e48906dca84ee702959c71a53ee80e7 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 23m
64+
rendered-master-072d4b2da7f88162636902b074e9e28e 5b6fb8349a29735e48446d435962dec4547d3090 2.2.0 31d
65+
rendered-master-3e88ec72aed3886dec061df60d16d1af 02c07496ba0417b3e12b78fb32baf6293d314f79 2.2.0 31d
66+
rendered-master-419bee7de96134963a15fdf9dd473b25 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 17d
67+
rendered-master-53f5c91c7661708adce18739cc0f40fb 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 13d
68+
rendered-master-a6a357ec18e5bce7f5ac426fc7c5ffcd 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 7d3h
69+
rendered-master-dc7f874ec77fc4b969674204332da037 5b6fb8349a29735e48446d435962dec4547d3090 2.2.0 31d
70+
rendered-worker-1a75960c52ad18ff5dfa6674eb7e533d 5b6fb8349a29735e48446d435962dec4547d3090 2.2.0 31d
71+
rendered-worker-2640531be11ba43c61d72e82dc634ce6 5b6fb8349a29735e48446d435962dec4547d3090 2.2.0 31d
72+
rendered-worker-4e48906dca84ee702959c71a53ee80e7 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 7d3h
73+
rendered-worker-4f110718fe88e5f349987854a1147755 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 17d
74+
rendered-worker-afc758e194d6188677eb837842d3b379 02c07496ba0417b3e12b78fb32baf6293d314f79 2.2.0 31d
75+
rendered-worker-daa08cc1e8f5fcdeba24de60cd955cc3 365c1cfd14de5b0e3b85e0fc815b0060f36ab955 2.2.0 13d
76+
----
77+
78+
. To deploy changes to a custom pool, create a machine config that uses the custom pool name as the label, such as `infra` in this example:
79+
+
80+
[source,terminal]
81+
----
82+
$ cat infra.mc.yaml
83+
----
84+
+
85+
.Example output
86+
[source,yaml]
87+
----
88+
apiVersion: machineconfiguration.openshift.io/v1
89+
kind: MachineConfig
90+
metadata:
91+
labels:
92+
machineconfiguration.openshift.io/role: infra
93+
name: 51-infra
94+
spec:
95+
config:
96+
ignition:
97+
version: 2.2.0
98+
storage:
99+
files:
100+
- contents:
101+
source: data:,infra
102+
filesystem: root
103+
mode: 0644
104+
path: /etc/infratest
105+
----
106+
107+
. Apply the machine config, then verify that the infra-labeled nodes are updated with the configuration file:
108+
+
109+
[source,terminal]
110+
----
111+
$ oc create -f infra.mc.yaml
112+
----

post_installation_configuration/cluster-tasks.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ infrastructure nodes are not counted toward the total number of subscriptions
2929
that are required to run the environment.
3030

3131
include::modules/infrastructure-components.adoc[leveloffset=+2]
32+
include::modules/nodes-scheduler-node-selectors-cluster.adoc[leveloffset=+2]
33+
34+
[id="moving-resources-to-infrastructure-machinesets"]
35+
== Moving resources to infrastructure machine sets
36+
37+
Some of the infrastructure resources are deployed in your cluster by default. You can move them to the infrastructure machine sets that you created.
38+
39+
include::modules/infrastructure-moving-router.adoc[leveloffset=+2]
40+
41+
include::modules/infrastructure-moving-registry.adoc[leveloffset=+2]
3242

3343
[id="post-install-creating-infrastructure-machinesets-production"]
3444
=== Creating infrastructure MachineSets for production environments
@@ -69,6 +79,9 @@ by adding `preemptible` to the MachineSet YAML file.
6979

7080
include::modules/machineset-yaml-vsphere.adoc[leveloffset=+3]
7181

82+
include::modules/creating-an-infra-node.adoc[leveloffset=+1]
83+
include::modules/creating-infra-machines.adoc[leveloffset=+1]
84+
7285
include::modules/cluster-autoscaler-about.adoc[leveloffset=+1]
7386
include::modules/cluster-autoscaler-cr.adoc[leveloffset=+2]
7487
:FeatureName: ClusterAutoscaler

0 commit comments

Comments
 (0)