What now?

Please note that we used autoscaling/v2beta1 version of HorizontalPodAutoscaler. At the time of this writing (November 2018), only v1 is stable and production-ready. However, v1 is so limited (it can use only CPU metrics) that it's almost useless. Kubernetes community worked on new (v2) HPA for a while and, in my experience, it works reasonably well. The main problem is not stability but potential changes in the API that might not be backward compatible. A short while ago, autoscaling/v2beta2 was released, and it uses a different API. I did not include it in the book because (at the time of this writing) most Kubernetes clusters do not yet support it. If you're running Kubernetes 1.11+, you might want to switch to v2beta2. If you do so, remember that you'll need to make a few changes to the HPA definitions we explored. The logic is still the same, and it behaves in the same way. The only visible difference is in the API.

Please consult HorizontalPodAutoscaler v2beta2 autoscaling (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#horizontalpodautoscaler-v2beta2-autoscaling) for the changes from v2beta1 we used to v2beta2 available in Kubernetes 1.11+.

That's it. Destroy the cluster if its dedicated to this book, or keep it if it's not or if you're planning to jump to the next chapter right away. If you're keeping it, please delete the go-demo-5 resources by executing the commands that follow.

 1  helm delete go-demo-5 --purge
 2
 3  kubectl delete ns go-demo-5

Before you leave, you might want to go over the main points of this chapter.

  • HPA is periodically evaluating metrics defined as scaling criteria.
  • HPA fetching data from Metrics Aggregator, and it does not really care whether they're coming from Metrics Server, Prometheus Adapter, or any other tool we could have used.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.190.93