You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/coreos-layering-configuring-on.adoc
+37-52Lines changed: 37 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,28 @@
6
6
[id="coreos-layering-configuring-on_{context}"]
7
7
= Using on-cluster layering to apply a custom layered image
8
8
9
-
To apply a custom layered image to your cluster by using the on-cluster build process, make a `MachineOSConfig` custom resource that includes a Containerfile, a machine config pool reference, repository push and pull secrets, and other parameters as described in the prerequisites.
9
+
To apply a custom layered image to your cluster by using the on-cluster build process, make a `MachineOSConfig` custom resource (CR) that specifies the following parameters:
10
10
11
-
When you create the object, the Machine Config Operator (MCO) creates a `MachineOSBuild` object and a `machine-os-builder` pod. The build process also creates transient objects, such as config maps, which are cleaned up after the build is complete.
11
+
* the Containerfile to build
12
+
* the machine config pool to associate the build
13
+
* where the final image should be pushed and pulled from
14
+
* the push and pull secrets to use
15
+
16
+
When you create the object, the Machine Config Operator (MCO) creates a `MachineOSBuild` object and a `machine-os-builder` pod. The build process also creates transient objects, such as config maps, which are cleaned up after the build is complete.
12
17
13
18
When the build is complete, the MCO pushes the new custom layered image to your repository for use when deploying new nodes. You can see the digested image pull spec for the new custom layered image in the `MachineOSBuild` object and `machine-os-builder` pod.
14
19
15
20
You should not need to interact with these new objects or the `machine-os-builder` pod. However, you can use all of these resources for troubleshooting, if necessary.
16
21
17
22
You need a separate `MachineOSConfig` CR for each machine config pool where you want to use a custom layered image.
18
23
19
-
:FeatureName: On-cluster image layering
20
-
include::snippets/technology-preview.adoc[]
21
-
22
24
.Prerequisites
23
25
24
-
* You have enabled the `TechPreviewNoUpgrade` feature set by using the feature gates. For more information, see "Enabling features using feature gates".
26
+
* You have a copy of the global pull secret in the `openshift-machine-config-operator` namespace that the MCO needs in order to pull the base operating system image.
25
27
26
-
* You have the pull secret in the `openshift-machine-config-operator` namespace that the MCO needs to pull the base operating system image.
28
+
* You have a copy of the `etc-pki-entitlement` secret in the `openshift-machine-api` namespace.
27
29
28
-
* You have the push secret that the MCO needs to push the new custom layered image to your registry.
30
+
* You have the push secret that the MCO needs in order to push the new custom layered image to your registry.
29
31
30
32
* You have a pull secret that your nodes need to pull the new custom layered image from your registry. This should be a different secret than the one used to push the image to the repository.
<1> Specifies the name of the machine config pool associated with the nodes where you want to deploy the custom layered image.
71
-
<2> Specifies the Containerfile to configure the custom layered image.
72
-
<3> Specifies the name of the image builder to use. This must be `PodImageBuilder`.
73
-
<4> Specifies the name of the pull secret that the MCO needs to pull the base operating system image from the registry.
74
-
<5> Specifies the image registry to push the newly-built custom layered image to. This can be any registry that your cluster has access to. This example uses the internal {product-title} registry.
75
-
<6> Specifies the name of the push secret that the MCO needs to push the newly-built custom layered image to that registry.
76
-
<7> Specifies the secret required by the image registry that the nodes need to pull the newly-built custom layered image. This should be a different secret than the one used to push the image to your repository.
72
+
<1> Specifies the machine config pool to deploy the custom layered image.
73
+
<2> Specifies the Containerfile to configure the custom layered image. You can specify multiple build stages in the Containerfile.
74
+
<3> Specifies the architecture of the image to be built. You must set this parameter to `noarch`.
75
+
<4> Specifies the build stage as final. This field is required and applies to the last image in the build.
76
+
<5> Specifies the name of the image builder to use. You must set this parameter to `PodImageBuilder`.
77
+
<6> Specifies the name of the pull secret that the MCO needs in order to pull the base operating system image from the registry.
78
+
<7> Specifies the image registry to push the newly-built custom layered image to. This can be any registry that your cluster has access to. This example uses the internal {product-title} registry.
79
+
<8> Specifies the name of the push secret that the MCO needs in order to push the newly-built custom layered image to the registry.
80
+
<9> Specifies the secret required by the image registry that the nodes need in order to pull the newly-built custom layered image. This should be a different secret than the one used to push the image to your repository.
77
81
78
82
.. Create the `MachineOSConfig` object:
79
83
+
@@ -115,13 +119,14 @@ When you save the changes, the MCO drains, cordons, and reboots the nodes. After
115
119
116
120
.Verification
117
121
118
-
. Verify that the new pods are running by using the following command:
122
+
. Verify that the new pods are ready by running the following command:
119
123
+
120
124
[source,terminal]
121
125
----
122
-
$ oc get pods -n <machineosbuilds_namespace>
126
+
$ oc get pods -n openshift-machine-config-operator
0 commit comments