manage
apply-hpa-config
Update the horizontal pod autoscaling (HPA) configuration for the specified components.
- Required role
- Instance administrator An instance administrator can run this command.
Extended description
You can use the apply-hpa-config command to enable or
disable automatic scaling. Automatic scaling uses the Red Hat®
OpenShift® Container Platform horizontal pod autoscaler to
automatically increase or decrease the number of pods in response to CPU or memory consumption.
Not all services support automatic scaling. For information about which services support automatic scaling, see Automatically scaling resources for services.
Syntax
cpd-cli manage apply-hpa-config \
--cpd_instance_ns=<project-name> \
--components=<comma-separated-list-of-component-names> \
--enable_hpa=true|false \
[--wait=true|false] \
[--param-file=tmp/work/<file-name>]
Arguments
The apply-hpa-config command has no arguments.
Options
| Option | Description |
|---|---|
--components |
The component or components for which you want to change the HPA
configuration.
|
--cpd_instance_ns |
The project (namespace) where the components for which you want to
change the HPA configuration are installed.
|
--enable_hpa |
Specify whether to enable horizontal pod
autoscaling.
|
--param-file |
The name of a YAML file that includes additional
parameters. Use this option to override the default custom resource name for components that support multiple instances. This option applies only to the
following components:
Create a file with the following
format:
The file must be in the
|
--wait |
Specify whether to wait for the custom resource to be
ready.
|
Examples
It is strongly recommended that you use a script to create environment variables with the correct values for your environment. For details, see Setting up installation environment variables.
- Enable automatic scaling the Decision Optimization service
-
cpd-cli manage apply-hpa-config \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --components=dods \ --enable_hpa=true - Disable automatic scaling the Orchestration Pipelines service
-
cpd-cli manage apply-hpa-config \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --components=ws_pipelines \ --enable_hpa=false