Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 16, 2020 04:53 pm GMT

Data Persistence in Kubernetes | Kubernetes Volumes simply explained

The problem

Kubernetes doesn't provide data persistence out of the box, which means when a pod is re-created, the data (of a database application for example) is lost.
So, you need to create and configure the actual physical storage and manage it by yourself.

How to do it

Once configured, you can use that physical storage using Kubernetes storage components.
In this video I show you 3 different Kubernetes volume components, that you need to use to connect the actual physical storage to your pod, so that the application inside the container can access it.

3 Volume Components

  • The 1st component "Persistent Volume" is a cluster resource, like CPU or RAM, which is created and provisioned by administrators.
  • The 2nd component "Persistent Volume Claim" on the other hand is a user's or pod's request for a persistent volume.
  • With the 3rd component "Storage Class" you can dynamically provision Persistent Volume component and so automate the storage provisioning process.

Kubernetes Volumes

ConfigMap and Secret as Volume Types

ConfigMap and Secret components can be used to:

  1. create individual key-value pairs, like db credentials or db url
  2. but also create configuration files, that can be mounted into the pod as volumes

You can find the full video here:

I'm happy to connect with you on


Original Link: https://dev.to/techworld_with_nana/data-persistence-in-kubernetes-kubernetes-volumes-simply-explained-852

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To