Posts

Showing posts with the label PV

K8s Storage Volumes Part 4 - Dynamic Provisioning

Image
Hello guys! I am back with new learning on the Kubernetes Storage Volume section series of posts, We have already seen that how we can create a PV, And then claiming that with different PVC, then you can use the PVC in the Pod manifestation under volumes section, But, in this post we will be exploring the various options available for Dynamic Provisioning with StorageClass. StorageClass - PersistentVolumeClaim used in Pod Wanted to know Kubernetes StorageClasses in depth. Visited many blog posts with different cloud choices people are working. Initially I've gone through the Mumshadmohammad session and practice lab, triedout on GCP platform. Previous Storage related posts Kubernetes Storage - EmptyDir Kubernetes HostPath Kubernetes NFS Volume as PV Basically, Kubernetes maintains two types of StorageClasses: Default storage class (Standard Storage class) User-defined storage class (Additional which is created with kubectl ) The additional storage-class will depend on t...

Kubernetes Storage Volumes Part -2 HostPath

Image
 Hello DevOps Guys!! This post is about Kubernetes Volume type hostPath type. In this post, I've tried multiple options with Volume with hostPath type association with Pods. Volume type - hostPath  it posts the persistent data to a specific file or directory on the Host machine's file-system Pods running on same node and using the same path in their volume  this hostPath volume is not deleted when Pod crashed or brought down intentionally Specialty of the hostPath Volume is retained, if a new Pod is started as replacement, the files in the hostPath volume will be reused and re-attached to new Pod. If we compare with emptyDir if the pod dies the Volume will be reclaimed by the Kubernetes Control Plane. whereas in hostPath it remains on the host path. Pre-requisites Docker Engine installed   Kubernetes Cluster Up and Running (You can do a test on MiniKube as well) Enough disk space to define in the PV manifestation In this post we will do two experiments Bare ...

K8s Storage Volumes part 1 - EmptyDir

Image
Hello, Dear DevOps enthusiasts, In this post, we are going to explore the emptyDir Volume, which is going to work as local data share between containers in a Pod. I had read the book titled ' Kubernetes in action ', from that book I want to understand Persistance Volumes and Persistence Volume Claims in detail. will run the following example for PV that uses emptyDir volume type. Every new learning is like a game! if you take each trouble as a game level it will be a wonderful game. Once you finish the desired state it's winning the game! why to wait let's jump on this game Kubernetes emptyDir Volume Assumptions Docker installed Kubernetes Installed and configured Cluster AWS access to EC2 instances We need to create a Tomcat container and Logstash container in the Kubernetes pod. In the below diagram, it will share the log file using Kubernetes volume that is empty dir. The tomcat and Logstash cant use the network via loc...