19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 13 ■ Using Autoscaling

Figure 13-14. CPU Utilization is at 0%

Increasing Load

Next, we shall demonstrate what increasing load on the deployment does to the number of pods and CPU

utilization. Run the following command by substituting the LoadBalancer Ingress to put some load on the

deployment:

curl <LoadBalancer Ingress>

In another terminal, get the HPA. The number of pods is listed as 3 because the CPU utilization at 22% is

below the target CPU Utilization of 100%, as shown in Figure 13-15.

Figure 13-15. CPU utilization increases to 22%

Run the following command loop by substituting the LoadBalancer Ingress to put more load on the

deployment:

while true; do curl <loadbalancer ingress>; done

Invoking the service in a loop outputs the same message repeatedly, as shown in Figure 13-16.

306

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!