简体   繁体   中英

How to queue pods in Kubernetes?

I am new to Kubernetes and I am facing some issues.

The project codebase in bitbucket and in each commit, there are pipelines in bitbucket which build a pod in the Kubernetes cluster. So the pods do some tasks and terminate after the task got completed. When the commits are high cluster fails due to a large number of pods. So I am trying to find a solution to queue it in the Kubernetes cluster so the pods will use all the resources of my cluster after the termination of the pods it will run the other pods in the queue and so on. Any help?

You can set pod resource requirements so that when you create a pod and requirements cannot be satisfied, scheduler will put it in pending state and schedule it as soon as there are available resources.

The only downfall of this solution is that it does not guarantee that pods will be created in the same order as api request sent to create them.

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