I have deployment with volumes and limits presented above. The problem is that kubernetes reject create pod with such error:
pods "app-app-96d5dc969-2g6zp" is forbidden:
exceeded quota: general-resourcequota, requested: limits.ephemeral-storage=1280Mi,
used: limits.ephemeral-storage=0, limited: limits.ephemeral-storage=1Gi
As I've understood nodes have limit 1Gi for ephemeral-storage, but what is 1280Mi? Is it correct, that kubernetes allocate some amount of memory for each volume?
...
spec:
containers:
resources:
limits:
cpu: 1
memory: 3Gi
ephemeral-storage: "1Gi"
requests:
cpu: 1
memory: 3Gi
ephemeral-storage: "1Gi"
volumeMounts:
- name: app-logs
mountPath: /app/log
- name: app-tmp
mountPath: /tmp
- name: app-backups
mountPath: /app/backups
- name: app-logback
mountPath: /app/config/logback.xml
subPath: logback.xml
- name: app-mdc
mountPath: /app/config/mdc.properties
subPath: mdc.properties
volumes:
- name: app-logs
emptyDir: {}
- name: app-tmp
emptyDir: {}
- name: app-backups
emptyDir: {}
- name: app-logback
configMap:
name: "{{ include "app.fullname" . }}-app-logback"
- name: app-mdc
configMap:
name: "{{ include "app.fullname" . }}-app-mdc"
Resource quotes for namespace:
kubectl describe quota
Name: general-resourcequota
Namespace: app
Resource Used Hard
-------- ---- ----
configmaps 5 15
limits.cpu 0 4
limits.ephemeral-storage 0 1Gi
limits.memory 0 8Gi
pods 0 10
requests.cpu 0 2
requests.memory 0 4Gi
requests.storage 0 50Gi
services 1 20
services.loadbalancers 1 5
services.nodeports 2 5