mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
TELCODOCS-2564: branch off main
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
a31b458c09
commit
6d3cffa1dc
110
modules/minimizing-worker-node-deployment-time.adoc
Normal file
110
modules/minimizing-worker-node-deployment-time.adoc
Normal file
@@ -0,0 +1,110 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * openshift-docs/updating/preparing_for_updates/updating-cluster-prepare.adoc
|
||||
|
||||
:_mod-docs-content-type: PROCEDURE
|
||||
[id="minimizing-worker-node-deployment-time_{context}"]
|
||||
= Minimizing worker node deployment time
|
||||
|
||||
You can minimize deployment time during cluster worker node installation by applying configuration changes across nodes simultaneously.
|
||||
|
||||
.Prerequisites
|
||||
|
||||
* You have access to the configuration file for your required installation method (`install-config.yaml` or similar).
|
||||
* You have the OpenShift CLI (`oc`) installed.
|
||||
* You have the OpenShift installation program (`openshift-install`) installed.
|
||||
* You have access to the cluster as a user with the `cluster-admin` role.
|
||||
* You create more than one worker Machine Configuration Pool (MCP) in the cluster.
|
||||
|
||||
.Procedure
|
||||
|
||||
. Create a MCP YAML file for each custom worker MCP that you intend to use, as in the following example:
|
||||
+
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: machineconfiguration.openshift.io/v1
|
||||
kind: MachineConfigPool
|
||||
metadata:
|
||||
name: worker-0
|
||||
labels:
|
||||
machineconfiguration.openshift.io/role: worker-0
|
||||
spec:
|
||||
machineConfigSelector:
|
||||
matchExpressions:
|
||||
- key: machineconfiguration.openshift.io/role
|
||||
operator: In
|
||||
values: [ worker, worker-0 ]
|
||||
paused: false
|
||||
maxUnavailable: 100%
|
||||
nodeSelector:
|
||||
matchLabels:
|
||||
node-role.kubernetes.io/worker-0: ""
|
||||
----
|
||||
+
|
||||
Ensure the following configurations are present:
|
||||
|
||||
* *maxUnavailable*: Set this value to `100%`. This setting ensures that all nodes within this specific MCP update concurrently during the initial deployment. By default, `maxUnavailable` is set to 1, causing all nodes within this specific MCP to update sequentially during the initial deployment.
|
||||
|
||||
* *nodeSelector*: Define a unique label, such as `node-role.kubernetes.io/worker-0`, to bind specific nodes to this pool.
|
||||
|
||||
* *paused*: Set this value to `true` if you plan to apply additional Day 2 configurations, such as `PerformanceProfile`, after installation. All Day 2 configurations can be applied while the MCP is paused. They will be queued and applied when you unpause the node. Set this value to `false` if no further configurations are required.
|
||||
+
|
||||
[NOTE]
|
||||
====
|
||||
For bare-metal servers, the reboot time can take up to a couple of minutes.
|
||||
====
|
||||
+
|
||||
. Place the YAML files in the directory generated by the installation program. Ensure that your worker nodes get assigned the correct labels, such as `node-role.kubernetes.io/worker-0`, during the provisioning phase or immediately upon joining.
|
||||
+
|
||||
[NOTE]
|
||||
====
|
||||
Proper labeling ensures that the nodes get assigned to the correct custom MCP rather than the default worker pool.
|
||||
====
|
||||
+
|
||||
. Optional: If you set the `paused` parameter to `true` to apply additional configurations, complete the following steps:
|
||||
.. Apply your Day 2 configuration.
|
||||
.. Unpause the MCPs to start the configuration phase and reboot if needed. Clusters must be deployed to access the API and run `oc` commands:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc patch mcp/worker-0 --patch '{"spec":{"paused":false}}' --type=merge
|
||||
----
|
||||
+
|
||||
.Example output
|
||||
[source,terminal]
|
||||
----
|
||||
machineconfigpool.machineconfiguration.openshift.io/worker-0 patched
|
||||
----
|
||||
+
|
||||
[NOTE]
|
||||
====
|
||||
If you did not set the `paused` parameter to `true`, the configuration will apply sequentially and reboot if needed.
|
||||
====
|
||||
|
||||
. Verify that the MCPs updated successfully:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc get machineconfigpools
|
||||
----
|
||||
+
|
||||
.Example output
|
||||
[source,terminal]
|
||||
----
|
||||
NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE
|
||||
master rendered-master-b0bb90c4921860f2a5d8a2f8137c1867 True False False 3 3 3 0 97m
|
||||
worker-0 rendered-worker-config-new False True False 10 0 0 0 5m
|
||||
----
|
||||
|
||||
. When all MCPs are set to `UPDATED=true`, update the MCPs with the appropriate `maxUnavailable` based on workload requirements. This ensures cluster stability and high availability when users deploy workloads onto the cluster. For example, set `maxUnavailable` to 1 by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc patch mcp/worker-0 --patch '{"spec":{"maxUnavailable":1}}' --type=merge
|
||||
----
|
||||
+
|
||||
.Example output
|
||||
[source,terminal]
|
||||
----
|
||||
machineconfigpool.machineconfiguration.openshift.io/worker-0 patched
|
||||
----
|
||||
@@ -50,3 +50,6 @@ include::modules/update-best-practices.adoc[leveloffset=+1]
|
||||
[role="_additional-resources"]
|
||||
.Additional resources
|
||||
* xref:../../updating/understanding_updates/intro-to-updates.adoc#understanding_clusteroperator_conditiontypes_understanding-openshift-updates[Understanding cluster Operator condition types]
|
||||
|
||||
// Minimizing worker node deployment time
|
||||
include::modules/minimizing-worker-node-deployment-time.adoc[leveloffset=+1]
|
||||
|
||||
Reference in New Issue
Block a user