简体   繁体   中英

Install HorizontalPodAutoscaler (HPA) using Helm

I'd like to do all k8s installation, configuration, and maintenance using Helm v3 (v3.7.2).

Thus I have setup yaml templates for:

  • deployment
  • configmap
  • service
  • ingress

Yet I can't find any information in the Helm v3 docs on setting up an HPA ( HorizontalPodAutoscaler ). Can this be done using an hpa.yaml that pulls from values.yaml?

Can this be done using an hpa.yaml that pulls from values.yaml?

Yes. HPA is a native Kubernetes resource that you can template out just like you have done for your other resources.

You can see many examples of HPA templates in the Bitnami Helm Charts . For example, apache has an hpa.yaml that is templated-out if .Values.autoscaling.enabled .

Yes. Example, try helm create nginx will create a template project call "nginx", and inside the "nginx" directory you will find a hpa.yaml example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM