Configure a Kubernetes Horizontal Pod Autoscaler
WHAT IT TESTS: Kubernetes autoscaling mechanics. OUTLINE: HPA adjusts replica count toward a target CPU metric, needs the metrics server and pod resource requests, and scales a deployment between min and max.
WHAT IT TESTS: whether you know how HPA actually works. ANSWER OUTLINE: the HPA controller periodically reads pod CPU usage from the metrics server, compares the average utilization against your target percentage, and adjusts the deployment's replica count within configured min and max bounds using the ratio of current to desired. It requires the metrics-server installed and, crucially, CPU resource requests defined on the pods, because utilization is a percentage of the request.
Read the original → interview
- #kubernetes
- #hpa
- #autoscaling
- #metrics-server
- #cloud
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.