This article will guide you about how to create HostPath persistent volume in Kubernetes.
You might be knowing that data in the Pod exists till the life time of the Pod. If the Pod dies all your data that belongs to the Pod is also goes away along with Pod. So if you want to persist your data beyond the life cycle of the Pod then you must have some thing called as a Persistent volume in Kubernetes.
So lets study how to How to create HostPath persistent volume which is very easy to experiment. Also to gain knowledge about the fundamentals about the Persistent volume.
There are following types of Persistent volume types available to use within kubernetes by different vendors.
As you can see for the HostPath it should be used only for the **testing purpose. **Also it does not support multi-node cluster. In case you want to explore more about the Persistent volumes you may follow this link.
The Basic process for Persistent volumes is as follows:
Enough for the theory Part Lets jump the Technical steps towards it:
In this step we are using following manifest yaml file to achieve the same.
#devops #kubernetes