Question about 100 pods per node limitation

3/26/2019

I'm trying to build a web app where each user gets their own instance of the app, running in its own container. I'm new to kubernetes so I'm probably not understanding something correctly.

I will have a few physical servers to use, which in kubernetes as I understand are called nodes. For each node, there is a limitation of 100 pods. So if I am building the app so that each user gets their own pod, will I be limited to 100 users per physical server? (If I have 10 servers, I can only have 500 users?) I suppose I could run multiple VMs that act as nodes on each physical server but doesn't that defeat the purpose of containerization?

-- dolgion
kubernetes

2 Answers

3/26/2019

Because of the hard limit if you have 10 servers you're limited to 1000 pods.

You might want to count also control plane pods in your 1000 available pods. Usually located in the namespace kube-system it can include (but is not limited to) :

  • node log exporters (1 per node)
  • metrics exporters
  • kube proxy (usually 1 per node)
  • kubernetes dashboard
  • DNS (scaling according to the number of nodes)
  • controllers like certmanager

A pretty good rule of thumb could be 80-90 application pods per node, so 10 nodes will be able to handle 800-900 clients considering you don't have any other big deployment on those nodes.


If you're using containers in order to gain perfs, creating node VMs will be against your goal. But if you're using containers as a way to deploy coherent environments and scale stateless applications then using VMs as node can make sense.

There are no magic rules and your context will dictate what to do.

As managing a virtualization cluster and a kubernetes cluster may skyrocket your infrastructure complexity, maybe kubernetes is not the most efficient tool to manage your workload.

You may also want to take a look at Nomad wich does not seem to have those kind of limitations and may provide features that are closer to your needs.

-- hugoShaka
Source: StackOverflow

3/26/2019

The main issue in having too many pods in a node is because it will degrade the node performance and makes is slower(and sometimes unreliable) to manage the containers, each pod is managed individually, increasing the amount will take more time and more resources.

When you create a POD, the runtime need to keep a constant track, doing probes (readiness and Liveness), monitoring, Routing rules many other small bits that adds up to the load in the node.

Containers also requires processor time to run properly, even though you can allocate fractions of a CPU, adding too many containers\pod will increase the context switch and degrade the performance when the PODs are consuming their quota.

Each platform provider also set their own limits to provide a good quality of service and SLAs, overloading the nodes is also a risk, because a node is a single point of failure, and any fault in high density nodes might have a huge impact in the cluster and applications.

You should either consider:

  • Smaller nodes and add more nodes to the cluster or
  • Use Actors instead, where each client will be one Actor. And many actor will be running in a single container. To make it more balanced around the cluster, you partition the actors into multiple containers instances.

Regarding the limits, this thread has a good discussion about the concerns

-- Diego Mendes
Source: StackOverflow