We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

HPA - Web

Now that you've seen how an application that chews through CPU will quickly scale up from a single pod to multiple pods, let's see what happens with an application that doesn't have much going on in terms of compute resources.

Assignment

Delete the line "replicas: 3" from the web deployment. This will allow our new autoscaler to have full control over the number of pods.

Copy your testcpu-hpa.yaml file and call it web-hpa.yaml. Update the following values:

  • name: web-hpa
  • Target the "web" deployment
  • Keep the scaling values the same

Apply the hpa, then use the following commands to see if any scaling happens:

kubectl get pods
kubectl top pods