My kubernetes clusters' nodes all have small root partitions. Is it possible to configure k8s to use an alternate location for emptyDir volumes?
Asked
Active
Viewed 3,000 times
7
-
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 Answers
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: {}

Kranthiveer Dontineni
- 167
- 8