How to increase shm size of a kubernetes container (--shm-size equivalent of docker)

后端 未结 3 649
闹比i
闹比i 2021-02-01 16:13

By default docker uses a shm size of 64m if not specified, but that can be increased in docker using --shm-size=256m

How should I increase shm size of a kuberenetes cont

3条回答
  •  逝去的感伤
    2021-02-01 16:53

    added below line in deployment.yaml and container came up for me which was failing-
    basically Mounting an emptyDir to /dev/shm and setting the medium to Memory

       spec:
         containers:
           - name: solace-service
             image: solace-pubsub-standard:latest
             volumeMounts:
               - mountPath: /dev/shm
                 name: dshm
             ports:
               - containerPort: 8080
         volumes:
           - name: dshm
             emptyDir:
                medium: Memory**
    

提交回复
热议问题