0% found this document useful (0 votes)
13 views8 pages

018 Slides-Kubernetes-Data-Volumes (UdemyIran - Com)

Uploaded by

mr.musavipur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views8 pages

018 Slides-Kubernetes-Data-Volumes (UdemyIran - Com)

Uploaded by

mr.musavipur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Understanding “State”

State is data created and used by your


application which must not be lost

User-generated data, user Intermediate results derived


accounts, … by the app

Often stored in a database, Often stored in memory,


but could also be files (e.g. temporary database tables
uploads) or files

Volumes
We Already Know The Solution!

Because we are still


Volumes!
dealing with Containers!

Kubernetes runs our Containers

Kubernetes needs to be configured


to add Volumes to our Containers
Kubernetes & Volumes

Kubernetes can mount Volumes into Containers

A broad variety of Volume types / drivers Volume lifetime depends on the Pod
are supported lifetime

Volumes survive Volumes are


”Local” Volumes Cloud-provider Container removed when
(i.e. on Nodes) specific Volumes restarts (and Pods are
removal) destroyed
Kubernetes Volumes vs Docker Volumes

Kubernetes Volumes Docker Volumes

Supports many different Drivers


Basically no Driver / Type Support
and Types

Volumes are not necessarily Volumes persist until manually


persistent cleared

Volumes survive Container restarts Volumes survive Container restarts


and removals and removals
Persistent Volumes

hostPath partially works


Volumes are destroyed when a
around that in “One-
Pod is removed
Node” environments

Pod- and Node-independent Volumes are sometimes required

Persistent Volumes
From Volumes To Persistent Volumes

Cluster

Node

Pod Pod

Node

Pod Pod
Persistent Volumes & Persistent Volume Claims

Cluster

Node

Persistent
Pod Pod PV Claim Volume (PV)

Node Persistent
Volume (PV)
Pod Pod PV Claim
“Normal” Volumes vs Persistent Volumes

Volumes allow you to persist data

”Normal” Volumes Persistent Volumes

Volume is attached to Pod and Pod Volume is a standalone Cluster


lifecycle resource (NOT attached to a Pod)

Defined and created together with Created standalone, claimed via a


Pod PVC

Repetitive and hard to administer on Can be defined once and used


a global level multiple times

You might also like