Getting started Community Training Tutorials Documentation APIs, AI & Tools
helm -n <namespace> upgrade \ <release-name> <helm-repository-name>/<helm-chart-name> \ --reuse-values \ --set replicaCount=<number of replicas>
For high availability (HA) environments, horizontal scaling distributes load across multiple Omni Gateway instances. By default, the Helm chart for Omni Gateway is configured with one replica. To release more Omni Gateway replicas into a namespace, provide one of the following configurations:
Set a replica count: Set a fixed number of Omni Gateway replicas to create.
Configure autoscaling: Generate replicas automatically based on CPU, memory, and other settings.
You can also limit voluntary disruptions with a PodDisruptionBudget and get CPU and memory request recommendations with a VerticalPodAutoscaler.
Find the default Helm chart settings for Omni Gateway (flex-gateway) through one of the following methods:
Open the flex-gateway page in ArtifactHUB
Run helm show values <helm-repository-name>/<helm-chart-name> from a terminal window, for example, helm show values flex-gateway/flex-gateway.
Ensure that the following prerequisites are in place:
An Omni Gateway deployment or a registered Omni Gateway instance (gateway)
For gateway registration and deployment processes, see Setting Up Self-Managed Omni Gateway or Getting Started with Self-Managed Omni Gateway in a Kubernetes Cluster.
A Kubernetes cluster for your Omni Gateway deployment
Configure and verify the number of replicas that you require. Note that new replicas replace existing replicas. If a newer version of Omni Gateway is available, the command replaces your older replica versions with the latest version.
The steps to take depend on whether a Helm chart is installed.
If a Helm chart for your namespace is installed, run the following command:
helm -n <namespace> upgrade \ <release-name> <helm-repository-name>/<helm-chart-name> \ --reuse-values \ --set replicaCount=<number of replicas>
helm -n gateway upgrade \
ingress flex-gateway/flex-gateway \
--reuse-values \
--set replicaCount=2
When successful, the command prints output similar to this example:
Release "ingress" has been upgraded. Happy Helming! NAME: ingress LAST DEPLOYED: Mon Apr 17 15:00:09 2023 NAMESPACE: gateway STATUS: deployed REVISION: 27 TEST SUITE: None
If the Helm chart is not installed, run the following command:
helm -n <namespace> \ upgrade -i --create-namespace \ <release-name> <helm-repository-name>/<helm-chart-name> \ --set-file registration.content=<registration file> \ --set replicaCount=<number of replicas>
helm -n gateway \
upgrade -i --create-namespace \
ingress flex-gateway/flex-gateway \
--set-file registration.content=registration.yaml \
--set replicaCount=2
When successful, the command prints output similar to this example:
Release "ingress" does not exist. Installing it now. NAME: ingress LAST DEPLOYED: Mon Apr 17 15:32:50 2023 NAMESPACE: gateway STATUS: deployed REVISION: 1 TEST SUITE: None
Verify creation of the replicas by running the following command:
kubectl get rs -n <namespace>
kubectl get rs -n gateway
When successful, the command prints output similar to this example:
NAME DESIRED CURRENT READY AGE ingress-5b7474b8f6 2 2 2 70s
Horizontal Pod autoscaling generates Omni Gateway replicas automatically based on CPU, memory, and other target and behavioral settings. For descriptions of these settings, see Autoscaling Parameters.
To update your Helm chart with autoscaling parameters:
Create a YAML file with your autoscaling configuration, modifying the settings to meet your requirements.
autoscaling:
enabled: true
| This configuration file is the minimum autoscaling configuration. To configure autoscaling with more detail, see Autoscaling Parameters. |
If a Helm chart for your namespace is installed, run the following command to apply your autoscaling configuration:
helm -n <namespace> upgrade \ <release-name> <helm-repository-name>/<helm-chart-name> \ --reuse-values \ -f <your-autoscaling-configuration-yaml>
helm -n gateway upgrade \
ingress flex-gateway/flex-gateway \
--reuse-values \
-f autoscaling.yaml
When successful, the command prints output similar to this example:
Release "ingress" has been upgraded. Happy Helming! NAME: ingress LAST DEPLOYED: Tue Apr 18 15:46:38 2023 NAMESPACE: gateway STATUS: deployed REVISION: 33 TEST SUITE: None
If the Helm chart is not installed, run the following command to apply the your autoscaling configuration:
helm -n <namespace> \ upgrade -i --create-namespace \ <release-name> <helm-repository-name>/<helm-chart-name> \ --set-file registration.content=<registration file> \ -f <your-autoscaling-configuration-yaml>
helm -n gateway \
upgrade -i --create-namespace \
ingress flex-gateway/flex-gateway \
--set-file registration.content=registration.yaml \
-f autoscaling.yaml
When successful, the command prints output similar to this example:
NAME: ingress LAST DEPLOYED: Tue Apr 18 15:50:29 2023 NAMESPACE: gateway STATUS: deployed REVISION: 1 TEST SUITE: None
Verify your autoscaling configuration by running the following command:
kubectl get hpa -n <namespace>
kubectl get hpa -n gateway
The command prints output similar to this example:
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE ingress Deployment/ingress 66%/50%, 5%/50% 2 11 2 59s
To use autoscaling, enable Horizontal Pod Autoscaler (HPA), and configure other Helm chart settings to define autoscaling behavior.
| Parameter | Description |
|---|---|
|
Boolean that indicates whether the Horizontal Pod Autoscaler (HPA) is enabled. Defaults to |
|
The minimum number of replicas that the HPA scaler is allowed to create. Defaults to |
|
The maximum number of replicas that the HPA scaler is allowed to create. Defaults to |
|
A resource metric that sets the average CPU usage percentage of all deployed Pods. Defaults to |
|
A string representing the average memory usage percentage of all deployed Pods. Defaults to |
|
A setting that supports the |
|
Settings for autoscaling behavior when the HPA scaler increases (
|
For more information about autoscaling, see the Kubernetes documentation.
A PodDisruptionBudget limits how many Omni Gateway pods can be unavailable at the same time during voluntary disruptions, such as node drains and cluster upgrades. The Helm chart doesn’t create a PodDisruptionBudget by default.
To create a PodDisruptionBudget for the Omni Gateway Deployment:
Create a YAML file with your PodDisruptionBudget configuration, for example:
podDisruptionBudget:
enabled: true
By default, the PodDisruptionBudget allows at most one unavailable pod (maxUnavailable: 1).
Apply the configuration with helm upgrade, as described in Update Your Helm Chart with an Autoscaling Configuration, for example:
helm -n gateway upgrade \
ingress flex-gateway/flex-gateway \
--reuse-values \
-f pdb.yaml
Verify the PodDisruptionBudget:
kubectl get pdb -n <namespace>
To keep the gateway available during a disruption, run at least two replicas. With one replica and maxUnavailable: 1, the PodDisruptionBudget allows the only pod to be evicted.
| Parameter | Description |
|---|---|
|
Boolean that indicates whether the Helm chart creates a PodDisruptionBudget for the Omni Gateway Deployment. Defaults to |
|
The maximum number of Omni Gateway pods that can be unavailable during a voluntary disruption. Defaults to |
For more information, see Disruptions in the Kubernetes documentation.
A VerticalPodAutoscaler (VPA) analyzes the CPU and memory usage of the Omni Gateway container and recommends CPU and memory requests. The Helm chart doesn’t create a VerticalPodAutoscaler by default.
Install the Kubernetes Vertical Pod Autoscaler in your cluster.
Create a YAML file with your VerticalPodAutoscaler configuration, for example:
verticalPodAutoscaler:
enabled: true
By default, the VerticalPodAutoscaler only produces recommendations (updateMode: Off) and doesn’t change the requests of running pods. Recommendations apply only to the Omni Gateway container.
Apply the configuration with helm upgrade, as described in Update Your Helm Chart with an Autoscaling Configuration, for example:
helm -n gateway upgrade \
ingress flex-gateway/flex-gateway \
--reuse-values \
-f vpa.yaml
View the recommendations:
kubectl describe vpa -n <namespace>
| Parameter | Description |
|---|---|
|
Boolean that indicates whether the Helm chart creates a VerticalPodAutoscaler for the Omni Gateway Deployment. Defaults to |
|
How the VerticalPodAutoscaler applies recommendations. Defaults to |
For more information, see the Vertical Pod Autoscaler documentation.