SlideShare a Scribd company logo
1 of 35
Download to read offline
Running Stateful Applications in
Containers with K8S Persistent
Volumes and StatefulSets
OpenStack Summit, Vancouver
Kapil Arora
Solution Architect, NetApp EMEA
May 23, 2018
Agenda
1) Stateful Apps and Persistent Data
2) K8S Persistent Data Concepts
3) Static vs Dynamic Provisioning
4) NetApp Trident
5) PostgreSQL Demo
2 © 2018 NetApp, Inc. All rights reserved.
Stateful Apps and Persistent Data
3 © 2018 NetApp, Inc. All rights reserved.
Stateful Apps
§ SQL Databases
§ MySQL, PostgreSQL, SQL Server
§ NoSQL Databases
§ MongoDB, ElasticSearch, Redis, Cassandra
§ Pub Sub Systems
§ Kafka
§ Time series Databases
§ InfluxDB, Graphite
§ Big Data
§ Splunk
For Example
4 © 2018 NetApp, Inc. All rights reserved.
Persistent Data
§ Object
§ S3, Swift
§ File
§ NFS, SMB, Manila, GlusterFS
§ Block
§ iSCSI, FC, EBS, Cinder
For Example
5 © 2018 NetApp, Inc. All rights reserved.
Kubernetes Volume Plugins
6 © 2018 NetApp, Inc. All rights reserved.
Kubernetes Volume Plugins
§ Reference block
device and
mounted file
system
§ Accesible by all
containers in a pod
§ Lifetime of a
volume is same as
the pod (or longer)
7 © 2018 NetApp, Inc. All rights reserved.
Kubernetes Node
Volume
POD
kubelet Docker
NFSVol1
NFSiSCSI
Cinder
Azure
Disk
GCE
PD
EBS
RDB
VOLUME PLUGINS
and more…
§ Remote
§ GCEPersistentDisk
§ AWSElasticBlockStore
§ AzureFile, AzureDisk
§ iSCSI , FC
§ Flocker
§ NFS
§ RBD, CephFS, GlusterFS
§ Cinder
§ VsphereVolume, VMware Photon
§ Quobyte Volumes
§ Portworx Volumes
§ ScaleIO Volumes
§ StorageOS
Kubernetes Volume Plugins
§ Ephemeral
§ Empty Dir
§ Secret
§ ConfigMap
§ Local Persistent Volume (beta)
§ Out-of-tree
§ CSI (beta)
§ Other
§ Host path
8 © 2018 NetApp, Inc. All rights reserved.
Example
§ Cinder Volume in a Pod
9 © 2018 NetApp, Inc. All rights reserved.
Example
§ EBS Volume in a Pod
10 © 2018 NetApp, Inc. All rights reserved.
Example
§ iSCSI volume in a Pod
11 © 2018 NetApp, Inc. All rights reserved.
Decouple storage implementation from consumption
PV and PVC Abstraction
12 © 2018 NetApp, Inc. All rights reserved.
Administrator creates a PV
§ PV: PersistentVolume API Object
• Configured for backing storage device
• NFS, iSCSI, Cinder, AWS EBS, GCE, Azure
• Includes connection information for the
storage volume
§ Example: NFS PV
13 © 2018 NetApp, Inc. All rights reserved.
User Creates PVC
§ PVC
§ PersistentVolumeClaim API Object
• Created by a user to request storage
§ User provides:
§ Size
§ Access mode
§ Storage class (optional)
• Kubernetes assigns a PV to meet
the requirements requested in the
PVC
• Does not require an exact match for
capacity
14 © 2018 NetApp, Inc. All rights reserved.
User provides PVC name in the Pod/Deployment
§ PVC claim name
§ mount path
15 © 2018 NetApp, Inc. All rights reserved.
Kubernetes Static Provisioning
16 © 2018 NetApp, Inc. All rights reserved.
K8SUser / Developer
Cluster / IT Admin
PV
5 GB
RWO
iSCSI
POD
PVC
5 GB
RWO
K8S PV
Controller
PersistentVolumeClaim PersistentVolume
Storage
POD
PVC
8 GB
RWO PV
10 GB
RWO
NFS
Storage Classes and Dynamic
Provisioning
17 © 2018 NetApp, Inc. All rights reserved.
StorageClass
§ Administrators can classify different storage types in the K8s environment using Storage
classes
§ Example
§ SSD/HDD
§ QoS
§ Dedupe/compression
§ Protocol: iSCSI/NFS
§ Etc.
§ Abstract underlying storage
§ E.g. Gold::Silver::Bronze
18 © 2018 NetApp, Inc. All rights reserved.
SC Example
§ Cinder
19 © 2018 NetApp, Inc. All rights reserved.
SC Example
§ NetApp ONTAP
§ NFS
§ SSD
20 © 2018 NetApp, Inc. All rights reserved.
Kubernetes Dynamic Provisioining
21 © 2018 NetApp, Inc. All rights reserved.
OpenShiftUser / Developer
Cluster / IT Admin
PV
8 GB
RWO
NFS
POD
PVC
8 GB
RWO
GOLD
K8S PV
Controller
PersistentVolumeClaim StorageClass
Gold
SSD
block
iSCSI
Bronze
HDD
NetApp
NetApp
Provisioner
(Trident)
NetApp Trident
22 © 2018 NetApp, Inc. All rights reserved.
Trident for Kubernetes
§ NetApp's Open source dynamic storage provisioner supporting:
§ ONTAP
§ SolidFire
§ E-Series
§ Automates Volume Creation and Mapping
§ Compatible with:
§ Kubernetes
§ OpenShift Origin & RedHat OCP
§ Snapshot and Cloning enabled
§ Available on GitHub: https://github.com/NetApp/trident
23 © 2018 NetApp, Inc. All rights reserved.
Resource Quotas
§ Kubernetes Resource Quotas
§ https://kubernetes.io/docs/concepts/policy/resource-quotas/
§ Blog
§ https://netapp.io/2017/06/09/self-provisioning-storage-kubernetes-without-worry/
§ Set Limits on
§ requests.storage
§ value.storageclass.storage.k8s.io/requests.storage
§ persistentvolumeclaims
§ value.storageclass.storage.k8s.io/persistentvolumeclaims
24 © 2018 NetApp, Inc. All rights reserved.
Future
§ Container Storage Interface (CSI)
§ Moving towards an industry standard, orchestrator-agnostic basic
storage abstraction
§ Standard API
§ Now Beta!
§ Spec
§ https://github.com/container-storage-interface/spec
§ Blog
§ https://kubernetes.io/blog/2018/04/10/container-storage-interface-
beta/
25 © 2018 NetApp, Inc. All rights reserved.
Demo : PostgreSQL
26 © 2018 NetApp, Inc. All rights reserved.
27 © 2018 NetApp, Inc. All rights reserved.
Kubernetes-cluster
psql StatefulSet
(master)
psql
pod-0
(replica)
psql
pod-1
(replica)
psql
pod-2
pv-1 pv-3pv-2
psql
service
master
psql
service
psql
service
replica
pvc-1 pvc-3pvc-2
Dynamic Storage
Provisioner
Helm / Tiller
Why use Helm?
§ Standardized deployments
§ Build a catalog for users
§ Repeatable and predictable deployments
§ Follow best practices
28 © 2018 NetApp, Inc. All rights reserved.
StatefulSets
When and Why?
29 © 2018 NetApp, Inc. All rights reserved.
State
+
Scale
Unique
Network IDs
Ordered
Deployment
&
Termination
30 © 2018 NetApp, Inc. All rights reserved.
Trident
postgresql-
pv-0
postgresql-statefulset
(replica=3)
postgresql-pod-0
postgresql-
container
postgresql-
pvc-0
postgresql-
service
port: 5432
postgresql-pod-1
postgresql-
container
postgresql-pod-2
postgresql-
container
postgresql-
pv-1
postgresql-
pvc-1
postgresql-
pv-2
postgresql-
pvc-2
Deploy postgresqlDB 3 replica StatefulSet
31 © 2018 NetApp, Inc. All rights reserved.
§ Stateful Apps run on Kubernetes
§ PV, PVC and StorageClass
§ Static vs Dynamic provisioning
§ NetApp Trident
§ CSI
32
Summary
© 2018 NetApp, Inc. All rights reserved.
§ Blog and Video
§ https://netapp.io/2018/03/21/deploy-postgresql-using-kubernetes-helm-trident/
§ PostgreSQL sample Helm Chart
§ https://github.com/NetAppEMEA/kubernetes-netapp
§ NetApp Trident
§ https://github.com/NetApp/trident
33 © 2018 NetApp, Inc. All rights reserved.
Resources
thePub: NetApp’s Developer and Open Source Community
Engage with NetApp Engineers, Partners, and Customers
© 2018 NetApp, Inc. All rights reserved. --- NETAPP CONFIDENTIAL ---34
GitHub
github.com/NetApp/trident
thePub
netapp.io
Twitter
@NetAppPub
Slack
netapp.io/slack
NetApp website
nt-ap.com/2CneVeR
35
Thank You
© 2018 NetApp, Inc. All rights reserved.

More Related Content

What's hot

A TRUE STORY ABOUT DATABASE ORCHESTRATION
A TRUE STORY ABOUT DATABASE ORCHESTRATIONA TRUE STORY ABOUT DATABASE ORCHESTRATION
A TRUE STORY ABOUT DATABASE ORCHESTRATIONInfluxData
 
Kubernetes Meetup - Seattle 2017-06-01
Kubernetes Meetup - Seattle 2017-06-01Kubernetes Meetup - Seattle 2017-06-01
Kubernetes Meetup - Seattle 2017-06-01Bassam Tabbara
 
Cloud Native Java Development Patterns
Cloud Native Java Development PatternsCloud Native Java Development Patterns
Cloud Native Java Development PatternsBilgin Ibryam
 
Persistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionPersistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionCheryl Hung
 
Microservices and Cloud Native Apps Meetup with Diamanti and Nirmata
Microservices and Cloud Native Apps Meetup with Diamanti and NirmataMicroservices and Cloud Native Apps Meetup with Diamanti and Nirmata
Microservices and Cloud Native Apps Meetup with Diamanti and NirmataFred Love
 
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s worldDávid Kőszeghy
 
Intro to creating kubernetes operators
Intro to creating kubernetes operators Intro to creating kubernetes operators
Intro to creating kubernetes operators Juraj Hantak
 
Containerized Storage for Containers
Containerized Storage for ContainersContainerized Storage for Containers
Containerized Storage for ContainersMurat Karslioglu
 
Red hat storage objects, containers and Beyond!
Red hat storage objects, containers and Beyond!Red hat storage objects, containers and Beyond!
Red hat storage objects, containers and Beyond!andreas kuncoro
 
Monitor Kubernetes in Rancher using InfluxData
Monitor Kubernetes in Rancher using InfluxDataMonitor Kubernetes in Rancher using InfluxData
Monitor Kubernetes in Rancher using InfluxDataInfluxData
 
Red Hat Storage Day Dallas - Gluster Storage in Containerized Application
Red Hat Storage Day Dallas - Gluster Storage in Containerized Application Red Hat Storage Day Dallas - Gluster Storage in Containerized Application
Red Hat Storage Day Dallas - Gluster Storage in Containerized Application Red_Hat_Storage
 
SFScon18 - Gerhard Sulzberger - Jason Tevnan - gitops with gitlab + terraform
SFScon18 - Gerhard Sulzberger - Jason Tevnan  - gitops with gitlab + terraformSFScon18 - Gerhard Sulzberger - Jason Tevnan  - gitops with gitlab + terraform
SFScon18 - Gerhard Sulzberger - Jason Tevnan - gitops with gitlab + terraformSouth Tyrol Free Software Conference
 
Aerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower ManhattanAerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower ManhattanAerospike
 
Introducing TiDB Operator
Introducing TiDB OperatorIntroducing TiDB Operator
Introducing TiDB OperatorKevin Xu
 
12.07.2017 Docker Meetup - POSTGRE SQL ON KUBERNETES
12.07.2017 Docker Meetup - POSTGRE SQL ON KUBERNETES12.07.2017 Docker Meetup - POSTGRE SQL ON KUBERNETES
12.07.2017 Docker Meetup - POSTGRE SQL ON KUBERNETESZalando adtech lab
 
The Kubernetes Effect
The Kubernetes EffectThe Kubernetes Effect
The Kubernetes EffectBilgin Ibryam
 
Cncf storage-final-filip
Cncf storage-final-filipCncf storage-final-filip
Cncf storage-final-filipJuraj Hantak
 
Introducing Kubestr - A New Way to Explore Your Kubernetes Storage Options
Introducing Kubestr - A New Way to Explore Your Kubernetes Storage OptionsIntroducing Kubestr - A New Way to Explore Your Kubernetes Storage Options
Introducing Kubestr - A New Way to Explore Your Kubernetes Storage OptionsLibbySchulze
 
Cloud Native Patterns
Cloud Native PatternsCloud Native Patterns
Cloud Native PatternsBilgin Ibryam
 
7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with ElasticKangaroot
 

What's hot (20)

A TRUE STORY ABOUT DATABASE ORCHESTRATION
A TRUE STORY ABOUT DATABASE ORCHESTRATIONA TRUE STORY ABOUT DATABASE ORCHESTRATION
A TRUE STORY ABOUT DATABASE ORCHESTRATION
 
Kubernetes Meetup - Seattle 2017-06-01
Kubernetes Meetup - Seattle 2017-06-01Kubernetes Meetup - Seattle 2017-06-01
Kubernetes Meetup - Seattle 2017-06-01
 
Cloud Native Java Development Patterns
Cloud Native Java Development PatternsCloud Native Java Development Patterns
Cloud Native Java Development Patterns
 
Persistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionPersistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in Production
 
Microservices and Cloud Native Apps Meetup with Diamanti and Nirmata
Microservices and Cloud Native Apps Meetup with Diamanti and NirmataMicroservices and Cloud Native Apps Meetup with Diamanti and Nirmata
Microservices and Cloud Native Apps Meetup with Diamanti and Nirmata
 
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
19. Cloud Native Computing - Kubernetes - Bratislava - Databases in K8s world
 
Intro to creating kubernetes operators
Intro to creating kubernetes operators Intro to creating kubernetes operators
Intro to creating kubernetes operators
 
Containerized Storage for Containers
Containerized Storage for ContainersContainerized Storage for Containers
Containerized Storage for Containers
 
Red hat storage objects, containers and Beyond!
Red hat storage objects, containers and Beyond!Red hat storage objects, containers and Beyond!
Red hat storage objects, containers and Beyond!
 
Monitor Kubernetes in Rancher using InfluxData
Monitor Kubernetes in Rancher using InfluxDataMonitor Kubernetes in Rancher using InfluxData
Monitor Kubernetes in Rancher using InfluxData
 
Red Hat Storage Day Dallas - Gluster Storage in Containerized Application
Red Hat Storage Day Dallas - Gluster Storage in Containerized Application Red Hat Storage Day Dallas - Gluster Storage in Containerized Application
Red Hat Storage Day Dallas - Gluster Storage in Containerized Application
 
SFScon18 - Gerhard Sulzberger - Jason Tevnan - gitops with gitlab + terraform
SFScon18 - Gerhard Sulzberger - Jason Tevnan  - gitops with gitlab + terraformSFScon18 - Gerhard Sulzberger - Jason Tevnan  - gitops with gitlab + terraform
SFScon18 - Gerhard Sulzberger - Jason Tevnan - gitops with gitlab + terraform
 
Aerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower ManhattanAerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower Manhattan
 
Introducing TiDB Operator
Introducing TiDB OperatorIntroducing TiDB Operator
Introducing TiDB Operator
 
12.07.2017 Docker Meetup - POSTGRE SQL ON KUBERNETES
12.07.2017 Docker Meetup - POSTGRE SQL ON KUBERNETES12.07.2017 Docker Meetup - POSTGRE SQL ON KUBERNETES
12.07.2017 Docker Meetup - POSTGRE SQL ON KUBERNETES
 
The Kubernetes Effect
The Kubernetes EffectThe Kubernetes Effect
The Kubernetes Effect
 
Cncf storage-final-filip
Cncf storage-final-filipCncf storage-final-filip
Cncf storage-final-filip
 
Introducing Kubestr - A New Way to Explore Your Kubernetes Storage Options
Introducing Kubestr - A New Way to Explore Your Kubernetes Storage OptionsIntroducing Kubestr - A New Way to Explore Your Kubernetes Storage Options
Introducing Kubestr - A New Way to Explore Your Kubernetes Storage Options
 
Cloud Native Patterns
Cloud Native PatternsCloud Native Patterns
Cloud Native Patterns
 
7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic
 

Similar to Running stateful applications in containers with k8 s persistent volumes and statefulsets

Kubernetes Storage Webinar.pptx
Kubernetes Storage Webinar.pptxKubernetes Storage Webinar.pptx
Kubernetes Storage Webinar.pptxEnrico Rampazzo
 
Hybrid Container for OpenStack Swift
Hybrid Container for OpenStack SwiftHybrid Container for OpenStack Swift
Hybrid Container for OpenStack SwiftSaeed Ghanbari
 
Oracle meetup kubernetes_171118
Oracle meetup kubernetes_171118Oracle meetup kubernetes_171118
Oracle meetup kubernetes_171118Oracle Korea
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to DeploymentAerospike, Inc.
 
Containers and Kubernetes
Containers and KubernetesContainers and Kubernetes
Containers and KubernetesAltoros
 
Amsteram Docker meetup - Cloud Native Storage - Chris Brandon
Amsteram Docker meetup -  Cloud Native Storage - Chris BrandonAmsteram Docker meetup -  Cloud Native Storage - Chris Brandon
Amsteram Docker meetup - Cloud Native Storage - Chris BrandonCatalin Jora
 
Persistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionPersistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionCheryl Hung
 
Introduction to Container Storage
Introduction to Container StorageIntroduction to Container Storage
Introduction to Container StorageCheryl Hung
 
Introduction to Container Storage
Introduction to Container StorageIntroduction to Container Storage
Introduction to Container StorageCheryl Hung
 
MayaData Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData  Datastax webinar - Operating Cassandra on Kubernetes with the help ...MayaData  Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData Datastax webinar - Operating Cassandra on Kubernetes with the help ...MayaData Inc
 
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaS
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaSOverpowered Kubernetes: CI/CD for K8s on Enterprise IaaS
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaSJ On The Beach
 
Persistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionPersistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionCheryl Hung
 
Running Stateful Apps on Kubernetes
Running Stateful Apps on KubernetesRunning Stateful Apps on Kubernetes
Running Stateful Apps on KubernetesYugabyte
 
Kubernetes on AWS 實作工作坊
Kubernetes on AWS 實作工作坊Kubernetes on AWS 實作工作坊
Kubernetes on AWS 實作工作坊Amazon Web Services
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018OpenEBS
 
AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018
AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018
AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018Amazon Web Services Korea
 
Containerized Storage for Containers: Why, What and How OpenEBS Works
Containerized Storage for Containers:  Why, What and How OpenEBS WorksContainerized Storage for Containers:  Why, What and How OpenEBS Works
Containerized Storage for Containers: Why, What and How OpenEBS WorksMatt Baldwin
 

Similar to Running stateful applications in containers with k8 s persistent volumes and statefulsets (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes Storage Webinar.pptx
Kubernetes Storage Webinar.pptxKubernetes Storage Webinar.pptx
Kubernetes Storage Webinar.pptx
 
Hybrid Container for OpenStack Swift
Hybrid Container for OpenStack SwiftHybrid Container for OpenStack Swift
Hybrid Container for OpenStack Swift
 
Oracle meetup kubernetes_171118
Oracle meetup kubernetes_171118Oracle meetup kubernetes_171118
Oracle meetup kubernetes_171118
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
Containers and Kubernetes
Containers and KubernetesContainers and Kubernetes
Containers and Kubernetes
 
Amsteram Docker meetup - Cloud Native Storage - Chris Brandon
Amsteram Docker meetup -  Cloud Native Storage - Chris BrandonAmsteram Docker meetup -  Cloud Native Storage - Chris Brandon
Amsteram Docker meetup - Cloud Native Storage - Chris Brandon
 
Persistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionPersistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in Production
 
Introduction to Container Storage
Introduction to Container StorageIntroduction to Container Storage
Introduction to Container Storage
 
Introduction to Container Storage
Introduction to Container StorageIntroduction to Container Storage
Introduction to Container Storage
 
MayaData Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData  Datastax webinar - Operating Cassandra on Kubernetes with the help ...MayaData  Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData Datastax webinar - Operating Cassandra on Kubernetes with the help ...
 
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaS
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaSOverpowered Kubernetes: CI/CD for K8s on Enterprise IaaS
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaS
 
Persistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in ProductionPersistent Storage with Kubernetes in Production
Persistent Storage with Kubernetes in Production
 
Kubernetes basics and hands on exercise
Kubernetes basics and hands on exerciseKubernetes basics and hands on exercise
Kubernetes basics and hands on exercise
 
Running Stateful Apps on Kubernetes
Running Stateful Apps on KubernetesRunning Stateful Apps on Kubernetes
Running Stateful Apps on Kubernetes
 
Kubernetes on AWS 實作工作坊
Kubernetes on AWS 實作工作坊Kubernetes on AWS 實作工作坊
Kubernetes on AWS 實作工作坊
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018
 
AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018
AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018
AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018
 
Containerized Storage for Containers: Why, What and How OpenEBS Works
Containerized Storage for Containers:  Why, What and How OpenEBS WorksContainerized Storage for Containers:  Why, What and How OpenEBS Works
Containerized Storage for Containers: Why, What and How OpenEBS Works
 

Recently uploaded

State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistandanishmna97
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 

Recently uploaded (20)

State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistan
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 

Running stateful applications in containers with k8 s persistent volumes and statefulsets

  • 1. Running Stateful Applications in Containers with K8S Persistent Volumes and StatefulSets OpenStack Summit, Vancouver Kapil Arora Solution Architect, NetApp EMEA May 23, 2018
  • 2. Agenda 1) Stateful Apps and Persistent Data 2) K8S Persistent Data Concepts 3) Static vs Dynamic Provisioning 4) NetApp Trident 5) PostgreSQL Demo 2 © 2018 NetApp, Inc. All rights reserved.
  • 3. Stateful Apps and Persistent Data 3 © 2018 NetApp, Inc. All rights reserved.
  • 4. Stateful Apps § SQL Databases § MySQL, PostgreSQL, SQL Server § NoSQL Databases § MongoDB, ElasticSearch, Redis, Cassandra § Pub Sub Systems § Kafka § Time series Databases § InfluxDB, Graphite § Big Data § Splunk For Example 4 © 2018 NetApp, Inc. All rights reserved.
  • 5. Persistent Data § Object § S3, Swift § File § NFS, SMB, Manila, GlusterFS § Block § iSCSI, FC, EBS, Cinder For Example 5 © 2018 NetApp, Inc. All rights reserved.
  • 6. Kubernetes Volume Plugins 6 © 2018 NetApp, Inc. All rights reserved.
  • 7. Kubernetes Volume Plugins § Reference block device and mounted file system § Accesible by all containers in a pod § Lifetime of a volume is same as the pod (or longer) 7 © 2018 NetApp, Inc. All rights reserved. Kubernetes Node Volume POD kubelet Docker NFSVol1 NFSiSCSI Cinder Azure Disk GCE PD EBS RDB VOLUME PLUGINS and more…
  • 8. § Remote § GCEPersistentDisk § AWSElasticBlockStore § AzureFile, AzureDisk § iSCSI , FC § Flocker § NFS § RBD, CephFS, GlusterFS § Cinder § VsphereVolume, VMware Photon § Quobyte Volumes § Portworx Volumes § ScaleIO Volumes § StorageOS Kubernetes Volume Plugins § Ephemeral § Empty Dir § Secret § ConfigMap § Local Persistent Volume (beta) § Out-of-tree § CSI (beta) § Other § Host path 8 © 2018 NetApp, Inc. All rights reserved.
  • 9. Example § Cinder Volume in a Pod 9 © 2018 NetApp, Inc. All rights reserved.
  • 10. Example § EBS Volume in a Pod 10 © 2018 NetApp, Inc. All rights reserved.
  • 11. Example § iSCSI volume in a Pod 11 © 2018 NetApp, Inc. All rights reserved.
  • 12. Decouple storage implementation from consumption PV and PVC Abstraction 12 © 2018 NetApp, Inc. All rights reserved.
  • 13. Administrator creates a PV § PV: PersistentVolume API Object • Configured for backing storage device • NFS, iSCSI, Cinder, AWS EBS, GCE, Azure • Includes connection information for the storage volume § Example: NFS PV 13 © 2018 NetApp, Inc. All rights reserved.
  • 14. User Creates PVC § PVC § PersistentVolumeClaim API Object • Created by a user to request storage § User provides: § Size § Access mode § Storage class (optional) • Kubernetes assigns a PV to meet the requirements requested in the PVC • Does not require an exact match for capacity 14 © 2018 NetApp, Inc. All rights reserved.
  • 15. User provides PVC name in the Pod/Deployment § PVC claim name § mount path 15 © 2018 NetApp, Inc. All rights reserved.
  • 16. Kubernetes Static Provisioning 16 © 2018 NetApp, Inc. All rights reserved. K8SUser / Developer Cluster / IT Admin PV 5 GB RWO iSCSI POD PVC 5 GB RWO K8S PV Controller PersistentVolumeClaim PersistentVolume Storage POD PVC 8 GB RWO PV 10 GB RWO NFS
  • 17. Storage Classes and Dynamic Provisioning 17 © 2018 NetApp, Inc. All rights reserved.
  • 18. StorageClass § Administrators can classify different storage types in the K8s environment using Storage classes § Example § SSD/HDD § QoS § Dedupe/compression § Protocol: iSCSI/NFS § Etc. § Abstract underlying storage § E.g. Gold::Silver::Bronze 18 © 2018 NetApp, Inc. All rights reserved.
  • 19. SC Example § Cinder 19 © 2018 NetApp, Inc. All rights reserved.
  • 20. SC Example § NetApp ONTAP § NFS § SSD 20 © 2018 NetApp, Inc. All rights reserved.
  • 21. Kubernetes Dynamic Provisioining 21 © 2018 NetApp, Inc. All rights reserved. OpenShiftUser / Developer Cluster / IT Admin PV 8 GB RWO NFS POD PVC 8 GB RWO GOLD K8S PV Controller PersistentVolumeClaim StorageClass Gold SSD block iSCSI Bronze HDD NetApp NetApp Provisioner (Trident)
  • 22. NetApp Trident 22 © 2018 NetApp, Inc. All rights reserved.
  • 23. Trident for Kubernetes § NetApp's Open source dynamic storage provisioner supporting: § ONTAP § SolidFire § E-Series § Automates Volume Creation and Mapping § Compatible with: § Kubernetes § OpenShift Origin & RedHat OCP § Snapshot and Cloning enabled § Available on GitHub: https://github.com/NetApp/trident 23 © 2018 NetApp, Inc. All rights reserved.
  • 24. Resource Quotas § Kubernetes Resource Quotas § https://kubernetes.io/docs/concepts/policy/resource-quotas/ § Blog § https://netapp.io/2017/06/09/self-provisioning-storage-kubernetes-without-worry/ § Set Limits on § requests.storage § value.storageclass.storage.k8s.io/requests.storage § persistentvolumeclaims § value.storageclass.storage.k8s.io/persistentvolumeclaims 24 © 2018 NetApp, Inc. All rights reserved.
  • 25. Future § Container Storage Interface (CSI) § Moving towards an industry standard, orchestrator-agnostic basic storage abstraction § Standard API § Now Beta! § Spec § https://github.com/container-storage-interface/spec § Blog § https://kubernetes.io/blog/2018/04/10/container-storage-interface- beta/ 25 © 2018 NetApp, Inc. All rights reserved.
  • 26. Demo : PostgreSQL 26 © 2018 NetApp, Inc. All rights reserved.
  • 27. 27 © 2018 NetApp, Inc. All rights reserved. Kubernetes-cluster psql StatefulSet (master) psql pod-0 (replica) psql pod-1 (replica) psql pod-2 pv-1 pv-3pv-2 psql service master psql service psql service replica pvc-1 pvc-3pvc-2 Dynamic Storage Provisioner Helm / Tiller
  • 28. Why use Helm? § Standardized deployments § Build a catalog for users § Repeatable and predictable deployments § Follow best practices 28 © 2018 NetApp, Inc. All rights reserved.
  • 29. StatefulSets When and Why? 29 © 2018 NetApp, Inc. All rights reserved. State + Scale Unique Network IDs Ordered Deployment & Termination
  • 30. 30 © 2018 NetApp, Inc. All rights reserved. Trident postgresql- pv-0 postgresql-statefulset (replica=3) postgresql-pod-0 postgresql- container postgresql- pvc-0 postgresql- service port: 5432 postgresql-pod-1 postgresql- container postgresql-pod-2 postgresql- container postgresql- pv-1 postgresql- pvc-1 postgresql- pv-2 postgresql- pvc-2 Deploy postgresqlDB 3 replica StatefulSet
  • 31. 31 © 2018 NetApp, Inc. All rights reserved.
  • 32. § Stateful Apps run on Kubernetes § PV, PVC and StorageClass § Static vs Dynamic provisioning § NetApp Trident § CSI 32 Summary © 2018 NetApp, Inc. All rights reserved.
  • 33. § Blog and Video § https://netapp.io/2018/03/21/deploy-postgresql-using-kubernetes-helm-trident/ § PostgreSQL sample Helm Chart § https://github.com/NetAppEMEA/kubernetes-netapp § NetApp Trident § https://github.com/NetApp/trident 33 © 2018 NetApp, Inc. All rights reserved. Resources
  • 34. thePub: NetApp’s Developer and Open Source Community Engage with NetApp Engineers, Partners, and Customers © 2018 NetApp, Inc. All rights reserved. --- NETAPP CONFIDENTIAL ---34 GitHub github.com/NetApp/trident thePub netapp.io Twitter @NetAppPub Slack netapp.io/slack NetApp website nt-ap.com/2CneVeR
  • 35. 35 Thank You © 2018 NetApp, Inc. All rights reserved.