1

I have used docker-bench-security on one of the kube-node to check best practices, I found one warning that PID limit is not set on containers. So Please provide a solution that how do I set PID limit for container in Kubernetes.

1 Answers1

1

Since Kubernetes 1.14, the kubelet supports limiting the number of PIDs a container can start.

The configuration parameter is called PodPidsLimit so depending on your Kubernetes distribution, you'll have to set that in your kubelet configuration.

Simon
  • 146
  • 5
  • also check here: [Stack Overflow - How to Set PID Limit in Kubernetes Pods](https://stackoverflow.com/questions/56272911/how-to-set-pid-limit-in-kubernetes-pod) – Will R.O.F. Jun 24 '20 at 14:49
  • As of now, GKE does not support manually changing the `PodPidsLimit` but they are in constant development. If this function is blocking your development, you should reach Google support for advice! – Will R.O.F. Jun 24 '20 at 16:03