Home > Software design >  How to increase the number of kubernetes pods in a specific time
How to increase the number of kubernetes pods in a specific time

Time:09-14

We are now using HPA to adjust the number of pods according to CPU and memory usage.

Also, I need a function that allows me to increase the pods at a specific time and end the pods after a while, but I wonder if there is a way.

I am currently using AWS EKS and ArgoCD.

CodePudding user response:

As far as I know, Kubernetes has no scheduled auto scaling policy so far. But if it were available, HPA and scheduled policy could be conflict.

How about following idea:

Use Cron Job or API(kubectl patch etc..), and change minimum number of Pods in a HPA to the number what you want. That is easy to increase the number of Pods and if you change the minimum number of Pods to the original number, HPA automatically adjust the number of Pods the system needs.

  • Related