Let's suppose i have 5 k8s nodes with 2 cpu on each node.

This mean i have 10 cpus.

Now let's suppose i want to deploy a very small and basic application with 20 replicas.

Is there a limitation on k8s that will allow only one pod for one cpu and reject 10/20 replicas ?


2 Answers 2


In addition to the good answer by @therianthropie, here are useful notes to help you understand the situation better.:

  • You can set requests and limits very arbitrarily (and yes, as fractions of a CPU and very small amounts of memory).
  • Kubernetes will not do its job well if you don't get real values for these.
  • If you under-shoot your request, kubernetes will schedule a lot of apps without requesting enough resources and you'll have problems with the CPU/memory/disk, and so on.
  • If you over-shoot your request a lot, your kubernetes nodes may be doing virtually nothing.
  • Some apps are very CPU bound, some memory bound, some use virtually no resources. So, you really can't guess.
  • Prometheus is a popular tool that you can install into kubernetes with basically a single command.
  • You can chart things in grafana.
  • So, then you choose your arbitrary values, then watch the charts as you use the app, and then you can adjust them to something sane / useful so kubernetes can do its job well. You can also set alerts with something called alert manager if your values are too ridiculous (it's a good idea once you're ready).
  • Note - requests are what kubernetes allocates for your pod. Limits are the max resources your pod can spike to when it needs them. There is a general assumption that not all pods will spike in usage at once / or over a long term or else this idea would not work.

No, you can set requests and limits with fractions of vCPUs. For example, every pod has a request/limit of 100m (1/10 of a CPU). This means 20 pods would need 2 CPUs in total.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.