Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(k8s): add a horizontal pod autoscaler
this scales up when the average CPU utilization is at 95% of the requested CPU. We should remove the replicas key from the deployment, otherwise any time we deploy it will overwrite the HPA (source: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#migrating-deployments-and-statefulsets-to-horizontal-autoscaling) Behaviour: - every 15 seconds - The HPA controller checks the value of the metric used every 15 seconds per pod. - every 3 minutes - The HPA scales up pods if the metric threshold has been continually exceeded for 3 mins. - every 5 minutes - The HPA scales down pods if the metric threshold has not been exceeded for 5 mins. Further info: - https://user-guide.cloud-platform.service.justice.gov.uk/documentation/concepts/deploying.html#horizontal-pod-autoscaling-hpa - https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale
- Loading branch information