1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/scale-up-autoscaler-hcp.adoc

54 lines
1.8 KiB
Plaintext

// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-machine-config.adoc
:_mod-docs-content-type: PROCEDURE
[id="scale-up-autoscaler-hcp_{context}"]
= Scaling up workloads in a hosted cluster
To scale up the workloads in your hosted cluster, you can use the `ScaleUpOnly` behavior.
.Prerequisites
* You have created the `HostedCluster` and `NodePool` resources.
.Procedure
. Enable cluster autoscaling for your hosted cluster by setting the scaling behavior to `ScaleUpOnly`. Run the following command:
+
[source,terminal]
----
$ oc patch -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> --type=merge --patch='{"spec": {"autoscaling": {"scaling": "ScaleUpOnly", "maxPodGracePeriod": 60}}}'
----
. Remove the `spec.replicas` field from the `NodePool` resource to allow the cluster autoscaler to manage the node count. Run the following command:
+
[source,terminal]
----
$ oc patch -n clusters nodepool <node_pool_name> --type=json --patch='[{"op": "remove", "path": "/spec/replicas"}]'
----
. Enable cluster autoscaling to configure the minimum and maximum node counts for your node pools. Run the following command:
+
[source,terminal]
----
$ oc patch -n <hosted_cluster_namespace> nodepool <nodepool_name>
--type=merge --patch='{"spec": {"autoScaling": {"max": 3, "min": 1}}}'
----
.Verification
. Verify that all compute nodes are in the `Ready` status by running the following command:
+
[source,terminal]
----
$ oc --kubeconfig <hosted_cluster_name>.kubeconfig get nodes
----
. Verify that the compute nodes are scaled up successfully by checking the node count for your node pools. Run the following command:
+
[source,terminal]
----
$ oc --kubeconfig nested.config get nodes -l 'hypershift.openshift.io/nodePool=<node_pool_name>'
----