exportENV=my-environment-nameexportNAMESPACE=apigee#the namespace where apigee is deployedexportCOMPONENT=runtime#can be udca or synchronizerexportMAX_REPLICAS=2exportMIN_REPLICAS=1
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eThis documentation covers version 1.6 of Apigee hybrid, which is end-of-life, and users should upgrade to a newer version.\u003c/p\u003e\n"],["\u003cp\u003eApigee hybrid runtime services can be scaled by adjusting parameters in the \u003ccode\u003eoverrides.yaml\u003c/code\u003e file, or by other scaling methods listed in the documentation.\u003c/p\u003e\n"],["\u003cp\u003eServices like Logger use DaemonSets for scaling, while services such as Ingress/LoadBalancer use Horizontal Pod Autoscaling (HPAs) via Anthos Service Mesh.\u003c/p\u003e\n"],["\u003cp\u003eMART Apigee Connect Watcher, and Runtime Synchronizer UDCA can be scaled by adjusting the \u003ccode\u003ereplicaCountMin\u003c/code\u003e and \u003ccode\u003ereplicaCountMax\u003c/code\u003e properties within their respective stanzas.\u003c/p\u003e\n"],["\u003cp\u003eAdvanced configurations, such as setting different scaling options for each environment or component, can be achieved by using the \u003ccode\u003ekubernetes patch\u003c/code\u003e command.\u003c/p\u003e\n"]]],[],null,["# Scale and autoscale runtime services\n\n| You are currently viewing version 1.6 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.6/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 ```gdscript\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 ```carbon\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 ```text\n kubectl get hpa -n $NAMESPACE\n ```"]]