I understand that a pod can have multiple containers. But, I am trying to find if there is a max limit on the number of containers within a pod. I have googled around, but could not find an answer.
I understand that a pod can have multiple containers. But, I am trying to find if there is a max limit on the number of containers within a pod. I have googled around, but could not find an answer.
AFAIK, there is no such pod-specific limit. Though there are some cluster-specific criteria (k8s v1.21) like:
N.B.: Since a pod can be scheduled to a single node, you are also limited by node resources (ie. cpu, memory). So, when you increase the number of containers of a pod, make sure that your node has enough resources to accommodate your pod.
No limit - as long as the node can satisfy the resource requirements
After further research I have discovered the following:
Cgroups, short for Control Groups, is provided by the Linux kernel. It is applied to restrict, record, and isolate the physical resources (CPU, memory, i/o) used by process groups. Cgroups can respectively form a tree structure composed of multiple sub cgroups, according to different resource types, so as to uniformly control the overall resource usage from top to bottom.
Just want to add kubernetes doc link for the above answer https://kubernetes.io/docs/setup/best-practices/cluster-large/