7

My kubernetes clusters' nodes all have small root partitions. Is it possible to configure k8s to use an alternate location for emptyDir volumes?

DjPadz
  • 71
  • 1
  • 3
  • Not that I'm aware of, a potential alternative (depending on what you are trying to achieve) might be using `hostPath` instead of `emptyDir`? – donhector Feb 20 '20 at 20:52

1 Answers1

0

Custom partitions or volumes can also be used for emptyDir. You need to mount the volume to kubernetes nodes and that mounted volume can be used for emptyDir. This is an example yaml file

apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: k8s.gcr.io/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /cache
      name: cache-volume
  volumes:
  - name: cache-volume
    emptyDir: {}