How do I set ulimit for containers in Kubernetes?

后端 未结 4 527
渐次进展
渐次进展 2020-12-15 19:48

How do I set ulimit for containers in Kubernetes? (specifically ulimit -u)

4条回答
  •  时光说笑
    2020-12-15 20:15

    In Kubernetes cluster (AWS EKS) you can change the ulimit for a docker container by modifying the /etc/docker/daemon.json in the node where your container is running.

    Add following lines to /etc/docker/daemon.json

    "default-ulimits": { "nofile": { "Name": "nofile", "Hard": 128000, "Soft": 128000 } }

    and finally restart the docker service on that node by executing following command.

    service docker restart

提交回复
热议问题