Since I don't have direct access to the storage, but want to run Kubernetes
in my own environment: Which software (on a VM) do I use to provide PV/PVC
via the file system
? I have heard about Ceph
. What do I have to consider? Are there alternatives?
If this is too general: Can I get around Ceph
(not that I wanted to) when I can only use the file system in a VM (yes/no)?
You could provide some more information regarding your environment.
Many depends on your needs. You mentioned
CephFS
, as it is supported in Kubernetes. However as you want to use VM it might be really hard. In this blog you can find information:You should read about Kubernetes Types of Volumes. Another important thing is Access Mode of each
PV
. To applyPersistentVolume
on VM you can use:emptyDir - An emptyDir volume is first created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node. In addition, if
Container
crashing does NOT remove a Pod from a node, so the data in an emptyDir volume is safe across Container crashes.Example and more information can be found here.
HostPath - will work only in a one node cluster. It will not work in multi-node cluster.
More details with example can be found here.
GlusterFS - In the future, if you would consider more versatile solution you could check
GlusterFS
. It's well described in this article.Local - Introduced in Kubernetes 1.14. A local volume represents a mounted local storage device such as a disk, partition or directory. Details with example can be found on Kubernetes docs.