SlideShare a Scribd company logo
How to manage stateful
applications in Kubernetes
Devoxx France - 2018
1
Florian Woerner
DevOps Engineer / Cloud Architect
Onmyown
@woernfl
florian.woerner@onmyown.io
2
Agenda ● Context
● Volume provider
● Volumes lifecycle management
● Demo
● Conclusion
3@woernfl
Why should I choose Kubernetes
over VMs?
4@woernfl
Because Kubernetes is a
distributed system
management framework
5
Why would we need to manage
data persistence?
6@woernfl
Because, stateless
architecture… it does not exist
7
Types of volumes
8
Types of Volumes - Kubernetes Internals
● configMap
● downwardAPI
● emptyDir
● gitRepo
● hostPath
● local
● persistentVolumeClaim
● projected
● Secret
● csi
9@woernfl
Types of Volumes - Public Cloud
10@woernfl
● awsElasticBlockStore
● azureDisk
● azureFile
● gcePersistentDisk
Types of Volumes - Non Cloud Dependant
● cephfs
● fc (fibre channel)
● flocker
● glusterfs
● nfs
● iscsi
● portworxVolume
● quobyte
● rbd (Rados Block Device)
● scaleIO
● storageos
● vsphereVolume
11@woernfl
Any issues?
12@woernfl
CSI to the rescue
13
What is CSI? ● Container Storage Interface
● Adopted by Kubernetes, Mesos and
Cloud Foundry (for the moment)
● Supported as beta in Kubernetes 1.10
(planed to fall in stable for 1.12)
● Is a standardized way of exposing
storage to a container
14@woernfl
Why is it so
important?
● Common interface to multiple
platforms (standardisation)
● Allow storage provider to release out
of tree
15@woernfl
Real world scenario with Bob the
dev and John the Sysadmin
16
Scenario: Persistent
Volumes and Claims
17
Scenario: Persistent Volumes and Claims
18@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Scenario: Persistent Volumes and Claims
19@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Persistent
Volume
Scenario: Persistent Volumes and Claims
20@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Persistent
Volume
Persistent
Volume
Claim
Scenario: Persistent Volumes and Claims
21@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Persistent
Volume
Persistent
Volume
Claim
Pod
Scenario: Persistent Volumes and Claims
22@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Persistent
Volume
Persistent
Volume
Claim
Pod
Scenario: Dynamic
Provisioning
23
Scenario: Dynamic Provisioning
24@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Scenario: Dynamic Provisioning
25@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Storage
Class - SDD
Storage
Class - HDD
Scenario: Dynamic Provisioning
26@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Persistent
Volume
Claim
Storage
Class - SDD
Storage
Class - HDD
Scenario: Dynamic Provisioning
27@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Persistent
Volume
Persistent
Volume
Claim
Storage
Class - SDD
Storage
Class - HDD
Scenario: Dynamic Provisioning
28@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Persistent
Volume
Persistent
Volume
Claim
Pod
Storage
Class - SDD
Storage
Class - HDD
Scenario: Dynamic Provisioning
29@woernfl
Kubernetes Node
Storage (NFS,
EBS, ...)
Persistent
Volume
Persistent
Volume
Claim
Pod
Storage
Class - SDD
Storage
Class - HDD
Demo
30
Conclusion
31
References
32
● Volumes Kubernetes Doc: https://kubernetes.io/docs/concepts/storage/volumes/
● Kubernetes Tasks: https://kubernetes.io/docs/tasks/
● Configure a Pod to Use a PersistentVolume for Storage:
https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/
● Run a Single-Instance Stateful Application:
https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/
● Run a Replicated Stateful Application:
https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/
● StatefulSets Kubernetes Doc:
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
@woernfl
Thank you!
33
Link to the repos: https://gitlab.com/woernfl/k8s-stateful-demo

More Related Content

What's hot (20)

PDF
CoreOS @ summer meetup in Utrecht
Timo Derstappen
 
PDF
Ceph on Windows
Ceph Community
 
PDF
XPDS14 - OSv - A Modern Semi-POSIX LibraryOS - Glauber Costa, Cloudius Systems
The Linux Foundation
 
PDF
Kubernetes
Diego Pacheco
 
ODP
Storage best practices
Maor Lipchuk
 
PDF
Hands On Gluster with Jeff Darcy
Gluster.org
 
PDF
Gluster as Native Storage for Containers - past, present and future
Gluster.org
 
PPTX
Improving hyperconverged performance
Denis Chapligin
 
PDF
OSv at Usenix ATC 2014
Don Marti
 
PDF
Make room! Make room!
Denis Chapligin
 
PDF
Integrating GlusterFS with iSCSI Target
ijsrd.com
 
PDF
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Gluster.org
 
PDF
CephFS Update
Ceph Community
 
PDF
Performance optimization for all flash based on aarch64 v2.0
Ceph Community
 
PDF
Heketi Functionality into Glusterd2
Gluster.org
 
PDF
[POSS 2019] OVirt and Ceph: Perfect Combination.?
Worteks
 
ODP
Ovirt and gluster_hyperconvergence_devconf-2016
Ramesh Nachimuthu
 
PDF
Object Compaction in Cloud for High Yield
ScyllaDB
 
PDF
CoreOS Overview
Nikolay Yurin
 
PDF
Ceph RBD Update - June 2021
Ceph Community
 
CoreOS @ summer meetup in Utrecht
Timo Derstappen
 
Ceph on Windows
Ceph Community
 
XPDS14 - OSv - A Modern Semi-POSIX LibraryOS - Glauber Costa, Cloudius Systems
The Linux Foundation
 
Kubernetes
Diego Pacheco
 
Storage best practices
Maor Lipchuk
 
Hands On Gluster with Jeff Darcy
Gluster.org
 
Gluster as Native Storage for Containers - past, present and future
Gluster.org
 
Improving hyperconverged performance
Denis Chapligin
 
OSv at Usenix ATC 2014
Don Marti
 
Make room! Make room!
Denis Chapligin
 
Integrating GlusterFS with iSCSI Target
ijsrd.com
 
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Gluster.org
 
CephFS Update
Ceph Community
 
Performance optimization for all flash based on aarch64 v2.0
Ceph Community
 
Heketi Functionality into Glusterd2
Gluster.org
 
[POSS 2019] OVirt and Ceph: Perfect Combination.?
Worteks
 
Ovirt and gluster_hyperconvergence_devconf-2016
Ramesh Nachimuthu
 
Object Compaction in Cloud for High Yield
ScyllaDB
 
CoreOS Overview
Nikolay Yurin
 
Ceph RBD Update - June 2021
Ceph Community
 

Similar to How to manage stateful applications in Kubernetes (20)

PDF
Storage os kubernetes clusters need persistent data
LibbySchulze
 
PPTX
DTW18 - code08 - Everything You Need To Know About Storage with Kubernetes
Kendrick Coleman
 
PDF
DCEU 18: Provisioning and Managing Storage for Docker Containers
Docker, Inc.
 
PDF
Running stateful applications in containers with k8 s persistent volumes and ...
Kapil Arora
 
PPTX
Introduction to Container Storage Interface (CSI)
Idan Atias
 
PDF
Think like a storage architect, in four questions
Cheryl Hung
 
PDF
Choosing the right storage for stateful workloads on Kubernetes
LibbySchulze
 
PPTX
Kubernetes Storage a Deep Look
Data Source
 
PPTX
Everything You Need To Know About Persistent Storage in Kubernetes
The {code} Team
 
PPTX
Robust Applications in Mesos using External Storage
David vonThenen
 
PDF
Storage for Windows workloads in Kubernetes
Anusha Ragunathan
 
PDF
Solving k8s persistent workloads using k8s DevOps style
MayaData
 
PDF
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
PDF
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
PDF
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
PDF
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
PDF
Containerizing stateful apps with Kubernetes and SUSE CaaS Platform
Juan Herrera Utande
 
PDF
Casos de uso para aplicaciones tradicionales en un mundo de contenedores
SUSE España
 
PDF
Kubernetes dealing with storage and persistence
Janakiram MSV
 
PDF
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
Storage os kubernetes clusters need persistent data
LibbySchulze
 
DTW18 - code08 - Everything You Need To Know About Storage with Kubernetes
Kendrick Coleman
 
DCEU 18: Provisioning and Managing Storage for Docker Containers
Docker, Inc.
 
Running stateful applications in containers with k8 s persistent volumes and ...
Kapil Arora
 
Introduction to Container Storage Interface (CSI)
Idan Atias
 
Think like a storage architect, in four questions
Cheryl Hung
 
Choosing the right storage for stateful workloads on Kubernetes
LibbySchulze
 
Kubernetes Storage a Deep Look
Data Source
 
Everything You Need To Know About Persistent Storage in Kubernetes
The {code} Team
 
Robust Applications in Mesos using External Storage
David vonThenen
 
Storage for Windows workloads in Kubernetes
Anusha Ragunathan
 
Solving k8s persistent workloads using k8s DevOps style
MayaData
 
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
Containerizing stateful apps with Kubernetes and SUSE CaaS Platform
Juan Herrera Utande
 
Casos de uso para aplicaciones tradicionales en un mundo de contenedores
SUSE España
 
Kubernetes dealing with storage and persistence
Janakiram MSV
 
Persistent Storage with Kubernetes in Production
Cheryl Hung
 
Ad

Recently uploaded (20)

PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Biography of Daniel Podor.pdf
Daniel Podor
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Ad

How to manage stateful applications in Kubernetes