- I am starting an EC2 test cluster of 3-minions of type 'm3.large'
- want to use 32G SSD storage available on these machine for a pod running on it
- want to use using 'hostPath' to mount some portion of this storage to pod so that it is available for the life of minions
However the issue is majority of this storage is allocated for "/mnt/ephemeral/docker" not available on host for 'hostPath' use. On minion it looks like
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 748M 75M 674M 10% /run
/dev/xvda1 7.8G 2.0G 5.5G 27% /
tmpfs 3.7G 828K 3.7G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.7G 0 3.7G 0% /sys/fs/cgroup
/dev/mapper/vg--ephemeral-docker 30G 5.0G 23G 18% /mnt/ephemeral/docker
/dev/mapper/vg--ephemeral-kubernetes 1.4G 1.4G 0 100% /mnt/ephemeral/kubernetes
tmpfs 748M 0 748M 0% /run/user/1000
Here 30G is allocated to "/mnt/ephemeral/docker" and is only available in docker container as a transient storage. I understand the EBS volumes for persistent store, however the SSD/ephemeral storage is persistent for the life of the EC2 instance and can be used for needs like data store for a Cassandra pod running in Kubernetes
The main issue is not being able to use the instance storage from within pods as instance persistence storage.
Configuring 'emptyDir' in pod uses 1.4G from '/mnt/ephemeral/kubernetes' and fills quickly
volumes: - name: data - emptyDir: {}Configuring 'hostPath' in pod uses 7.8G from '/' and fills quickly
volumes: - name: data - hostPath: path: /cassandra_data
Major chunk of instance storage 30G is allocated to '/mnt/ephemeral/docker' and is not avilable for Kubernates pods as instance persistent storage. What is the best way to use (Kubernetes volumes) the SSD storage that comes built-in with the EC2 instances.