You can scale most services running in Kubernetes from the
command line or in a configuration override. You can set scaling
parameters for Apigee hybrid runtime services in the
overrides.yaml file.
DaemonSets manage replicas of a pod on all nodes, so they scale
when you scale the pods themselves.
MART
Apigee Connect
Watcher
ApigeeOrganization (CRD)
To scale via configuration, increase the value of the
Deployment's replicaCountMin configuration property
for the mart, watcher, and/or connectAgent stanzas.
For example:
These Deployments use a Horizontal Pod Autoscaler for autoscaling. Set
the Deployment object's targetCPUUtilizationPercentage
property to the threshold for scaling up; when this value is
exceeded, Kubernetes adds pods up to the value of
replicaCountMax.
To scale via configuration, increase the value of the
replicaCountMin property for the udca, synchronizer,
and/or runtime
stanzas in the overrides file. For example:
Note: These changes apply to ALL environments in the overrides file.
If you wish to customize scaling for each environment see Advanced configurations below.
These deployments use a Horizontal Pod Autoscaler for
autoscaling. Set the Deployment object's
targetCPUUtilizationPercentage property to the
threshold for scaling up; when this value is exceeded, Kubernetes
adds pods up to the value of replicaCountMax.
In some scenarios, you may need to use advanced scaling options. Example scenarios include:
Setting different scaling options for each environment. For example, where env1 has
a minReplica of 5 and env2 has a minReplica of 2.
Setting different scaling options for each component within an environment. For example,
where the udca component has a maxReplica of 5 and the
synchronizer component has a maxReplica of 2.
The following example shows how to use the kubernetes patch command to change
the maxReplicas property for the runtime component:
Create environment variables to use with the command:
export ENV=my-environment-name
export NAMESPACE=apigee #the namespace where apigee is deployed
export COMPONENT=runtime #can be udca or synchronizer
export MAX_REPLICAS=2
export MIN_REPLICAS=1
Apply the patch. Note that this example assumes that kubectl is in your PATH:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThe Apigee hybrid documentation version 1.4 is end-of-life, and users should upgrade to a newer version for continued support.\u003c/p\u003e\n"],["\u003cp\u003eScaling parameters for Apigee hybrid runtime services can be configured in the \u003ccode\u003eoverrides.yaml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eDifferent services like Cassandra, Ingress/LoadBalancer, Logger, MART Apigee Connect Watcher, and Runtime Synchronizer UDCA have their own specific methods and settings for scaling in Kubernetes, including the use of Horizontal Pod Autoscalers and DaemonSets.\u003c/p\u003e\n"],["\u003cp\u003eAdvanced scaling scenarios, such as setting different scaling options for each environment or component, are possible through the use of the \u003ccode\u003ekubernetes patch\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eScaling of MART, watcher and connect agent are all done by editing the replica count using the same properties, that being replicaCountMin and replicaCountMax.\u003c/p\u003e\n"]]],[],null,["# Scale and autoscale runtime services\n\n| You are currently viewing version 1.4 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\nYou can scale most services running in Kubernetes from the\ncommand line or in a configuration override. You can set scaling\nparameters for Apigee hybrid runtime services in the\n[`overrides.yaml` file](/apigee/docs/hybrid/v1.4/customize-services).\n\nAdvanced configurations\n-----------------------\n\n\nIn some scenarios, you may need to use advanced scaling options. Example scenarios include:\n\n- Setting different scaling options for each environment. For example, where env1 has a `minReplica` of 5 and env2 has a `minReplica` of 2.\n- Setting different scaling options for each component within an environment. For example, where the `udca` component has a `maxReplica` of 5 and the `synchronizer` component has a `maxReplica` of 2.\n\n\nThe following example shows how to use the `kubernetes patch` command to change\nthe `maxReplicas` property for the `runtime` component:\n\n\n1. Create environment variables to use with the command: \n\n ```\n export ENV=my-environment-name\n export NAMESPACE=apigee #the namespace where apigee is deployed\n export COMPONENT=runtime #can be udca or synchronizer\n export MAX_REPLICAS=2\n export MIN_REPLICAS=1\n ```\n2. Apply the patch. Note that this example assumes that `kubectl` is in your `PATH`: \n\n ```\n kubectl patch apigeeenvironment -n $NAMESPACE \\\n $(kubectl get apigeeenvironments -n $NAMESPACE -o jsonpath='{.items[?(@.spec.name == \"'$ENV'\" )]..metadata.name}') \\\n --patch \"$(echo -e \"spec:\\n components:\\n $COMPONENT:\\n autoScaler:\\n maxReplicas: $MAX_REPLICAS\\n minReplicas: $MIN_REPLICAS\")\" \\\n --type merge\n ```\n3. Verify the change: \n\n ```\n kubectl get hpa -n $NAMESPACE\n ```"]]