I am deploying a Pod to a Standard_NC12s_v3 node on Azure Kubernetes. On the microsoft webpage this node is described to have 1474Gb temp storage (SSD).
In the pod spec, I set the ephemeral-storage to be at least 100Gi (see resource description below). However, when I run $ df -h in the pod, the ephemeral storage (of type emptyDir) has a size of 124G. I would have expected it to have 100G like I requested. The overlay storage I would have expected to be close to 1474Gb (nodes SSD disk size)
My requirement is to have a temporary volume on the pod which is deleted when the pod dies. The reason for it is that I need fast disk IO instead of network IO when storing on a persistent volume.
Pod resource description:
kind: Pod
apiVersion: v1
metadata:
name: {{ .Values.name }}
labels:
for: devs
spec:
containers:
- name: {{ .Values.name }}
image: "{{ .Values.image.acr }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
command: ["/bin/sleep", "3650d"]
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
requests:
cpu: "1"
memory: 12G
ephemeral-storage: 100Gi
limits:
cpu: "2"
memory: 24G
ephemeral-storage: 300Gi
volumeMounts:
- mountPath: {{ .Values.pvc.mount }}
name: volume
- mountPath: /cache
name: cache-volume
restartPolicy: Always
volumes:
- name: volume
persistentVolumeClaim:
claimName: {{ .Values.pvc.name }}
- name: cache-volume
emptyDir: {}
{{- if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 4 }}
{{- end }}
