By default, many of the UDP services are configured to autoscale via horizontal pod autoscalers (or hpa) which will scale the services either up or down based on predetermined metrics.

To view the hpa definitions and their current settings run the following command:

View HPA Definitions
kubectl get hpa -n ${NAMESPACE}

If you discover that the default hpa settings for a service is not meeting your needs, you can update the hpa settings for that service in order to meet your needs.

WARNING: HPA Replication

Increasing the hpa replica number can cause your GKE cluster to scale up by adding new nodes if your cluster does not have capacity to support the new scale. Please make sure you understand the limits of your GKE clusters scaling and the billing increase that will happen by changing these settings.


To update the scaling settings, edit the hpa via one of the following commands:

Change the minimum number of pod allowed to be running:

Update minimum number
kubectl -n ${NAMESPACE} patch hpa ${HPA_NAME} --patch "{\"spec\":{\"minReplicas\":${MIN_PODS}}}"

Change the maximum number of pod allowed to be running:

Update maximum number
kubectl -n ${NAMESPACE} patch hpa ${HPA_NAME} --patch "{\"spec\":{\"maxReplicas:\":${MAX_PODS}}}"

HPA Metric

We do not recommend changing the hpa metric targets but can be done so at your own discretion by changing the targetCPUUtilizationPercentage setting or metrics definition in the hpa.


  • No labels