mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
//
|
|
// * machine_management/modifying-machineset.adoc
|
|
// * scalability_and_performance/recommended-cluster-scaling-practices.adoc
|
|
|
|
[id="machineset-modifying_{context}"]
|
|
= Modifying a machine set
|
|
|
|
To make changes to a machine set, edit the `MachineSet` YAML. Then, remove all machines associated with the machine set by deleting each machine or scaling down the machine set to `0` replicas. Then, scale the replicas back to the desired number. Changes you make to a machine set do not affect existing machines.
|
|
|
|
If you need to scale a machine set without making other changes, you do not need to delete the machines.
|
|
|
|
[NOTE]
|
|
====
|
|
By default, the {product-title} router pods are deployed on workers. Because the router is required to access some cluster resources, including the web console, do not scale the worker machine set to `0` unless you first relocate the router pods.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* Install an {product-title} cluster and the `oc` command line.
|
|
* Log in to `oc` as a user with `cluster-admin` permission.
|
|
|
|
.Procedure
|
|
|
|
. Edit the machine set:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc edit machineset <machineset> -n openshift-machine-api
|
|
----
|
|
|
|
. Scale down the machine set to `0`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc scale --replicas=0 machineset <machineset> -n openshift-machine-api
|
|
----
|
|
+
|
|
Or:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc edit machineset <machineset> -n openshift-machine-api
|
|
----
|
|
+
|
|
Wait for the machines to be removed.
|
|
|
|
. Scale up the machine set as needed:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc scale --replicas=2 machineset <machineset> -n openshift-machine-api
|
|
----
|
|
+
|
|
Or:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc edit machineset <machineset> -n openshift-machine-api
|
|
----
|
|
+
|
|
Wait for the machines to start. The new machines contain changes you made to the machine set.
|