I googled , but didn't get any solution to this.
Q: in k8s/gke node version 1.12.10-XX: the /dev directory size inside a pod, come around half of the underlying node memory size.
where as in latest version it comes fix only 64M. But I want a larger size of /dev inside my pod.
There is already an open issue about that on GoogleCloudPlatform's github issue tracker. The issue has been created in late Feb.
I suggest adding "+1" there by leaving a comment and monitoring the progress.
I can't confirm that isn't working using Container-Optimized OS (cos) 1.14.10-gke.27 (master version)
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
app: test1
name: test1
spec:
replicas: 1
selector:
matchLabels:
app: test1
template:
metadata:
labels:
app: test1
spec:
volumes:
- name: demo
emptyDir:
medium: Memory
sizeLimit: "1Gi"
containers:
- name: busy
image: busybox
command: ["/bin/sh"]
args: ["-c", "sleep 3000"]
volumeMounts:
- name: demo
mountPath: /dev/shm
It's 1,8Gi ~= 0.5 the underlying node memory size
Filesystem Size Used Available Use% Mounted on
overlay 94.3G 2.9G 91.4G 3% /
tmpfs 1.8G 0 1.8G 0% /dev/shm
Please note
the sizeLimit parameter set for emptyDir works differently (in this release at the moment) - eviction manager keeps monitoring the disk space used by pod emptyDir volume and it will evict pods when the usage exceeds the limit.
medium <string>
What type of storage medium should back this directory. The default is ""
which means to use the node's default medium. Must be an empty string
(default) or Memory
sizeLimit <string>
Total amount of local storage required for this EmptyDir volume. The size
limit is also applicable for memory medium.
The maximum usage on memory medium EmptyDir would be the minimum value
between the SizeLimit specifiedhere and the sum of memory limits of all
containers in a pod. The default is nil which means that the limit is
undefined
Hope this help.