Setting Kubernetes emptyDir volume size

1/5/2016

I'm creating a ram based emptyDir volume for a pod.

 volumes:
  - name: ram-disk
    emptyDir:
      medium: "Memory"

Because this is a ram disk, I need to set the maximum size which it will take from the ram. Is there a parameter to set maximum size and minimum size?

-- Dimuthu
kubernetes

2 Answers

8/8/2017
-- flyer
Source: StackOverflow

1/5/2016

TL;DR: No, at least not for now.

This is an open issue, see 13479. Since I don't know your use case, I suppose my only suggestion is to try and use hostPath as a workaround, see also the docs for more details.

-- Michael Hausenblas
Source: StackOverflow