Max user processes in k8s container and on the host Max user processes in k8s container and on the host kubernetes kubernetes

Max user processes in k8s container and on the host


Nproc is not namespaced and is tied to the UID, but does this limit within the pod correlate somehow with the same limit on the host for the same user?

They are not correlated.

what if I have multiple pods which have higher setting for max user processes for e.g. root user than that on the host?

Limits from the container will be applied. That is one of the reasons why Kubernetes is not ready to run an untrusted payload.

There is this thing - pid cgroup - which is available in the newer kernel (starting with 4.3 ), far as I know docker designed their --pids-limit feature based on it. But it's not available for kubernetes yet.

Work in progress and many things already done. You can track it here and here.