Kubernetes(k8s) docker 修改 /dev/shm大小

一、问题

/dev/shm太小,想要扩容。却扩容失败

二、分析

Kubernetes不支持这操作。默认64M

三、解决方案

在/dev/shm下建个空文件夹,并将medium设置为Memory

spec:
  volumes:
  - name: dshm
    emptyDir:
      medium: Memory
  containers:
  - image: gcr.io/project/image
    volumeMounts:
      - mountPath: /dev/shm
        name: dshm

参考

猜你喜欢

转载自www.cnblogs.com/diffx/p/11005799.html