user4202236
user4202236

Reputation: 210

Can I define minimum size for emptyDir in kubernetes

I created a pod with a volume mounted on it as emptyDir.

        - name: tmp
          emptyDir: {}

However the pod has only ~5GB of memory allocated to tmp directory. Is there a way I could predefine the tmp volume in such a way that I can get ~50GB memory allocated to it?

Note: I tried setting sizeLimit based on this thread but it is to set the upper limit and not the lower limit for an emptyDir volume.

Also I prefer using ephemeral storage for this application rather than persistent volumes.

Upvotes: 0

Views: 1428

Answers (1)

Emruz Hossain
Emruz Hossain

Reputation: 5528

You can use Generic ephemeral volume if you are looking for the behavior of ephemeral volume but features of PVC. This will allow you to specify the size of ephemeral volume you need.

Upvotes: 3

Related Questions