Public
Choosing Right Storage
for Kubernetes
Abhinivesh Jain
Distinguished Member of Technical Staff
12-Aug-2021
Public © confidential 2
About Me
@AbhiniveshJain
/abhiniveshjain
Author,
Speaker and
Blogger
Open Source
“Contributor”
Working as
Distinguished
Member of
Technical Staff
(DMTS)-
Senior
Member in
CTO-5G Team
in Wipro
Public © confidential 3
Agenda
01
Stateful and
Stateless Workloads
02
Kubernetes
storage concepts
03
Storage fabric
options
04
Choosing the right
storage
05
Lesson learnt
06
Key Takeaways
Public © confidential 4
01
Stateful and Stateless
applications
04
Choosing the right
storage
02
Kubernetes
storage concepts
03
Storage fabric
options
05
Lesson learnt
06
Key Takeaways
Agenda
Public © confidential 5
Stateful Vs Stateless workloads
01 02 03
04 05 06
Kubernetes
was originally
built for
stateless
workloads
Stateless
workloads
are not
affected by
POD restarts
Stateful
workload
needs to
preserve the
state after
POD restart
Stateful
workloads
examples-
Databases
Stateful
workloads
requires use
of permanent
storage
Stateful
workloads is
not same as
Statefulsets
Public © confidential 6
Agenda
01
Stateful and
Stateless Workloads
04
Choosing the right
storage
02
Kubernetes
storage concepts
03
Storage fabric
options
05
Lesson learnt
06
Key Takeaways
Public © confidential 7
Kubernetes storage concepts
1
2
3
4
5
Volumes
Persistent Volume (PV)
Persistent Volume Claim (PVC)
Storage Class
hostPath
Public © confidential 8
K8s Storage concepts- Volume
awsElasticBlockStore
azureDisk
azureFile
cephfs
cinder
configMap
downwardAPI
emptyDir
fc (fibre channel)
gcePersistentDisk
glusterfs
hostPath
iscsi
local
nfs
persistentVolumeClaim
portworxVolume
projected
quobyte
rbd
secret
storageOS
vsphereVolume
Volume is a
Directory
2 Types
Ephemeral Volume
Persistent Volume (PV)
Ephemeral Volume-
Lifetime of a POD
Kubernetes
supports several
volume types
Public © confidential 9
Persistent Volume(PV)
apiVersion: v1
kind: PersistentVolume
metadata:
name: cncf-demo-pv
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
Piece of storage Static or Dynamic
Can use several different
types of PV in same POD
Public © confidential 10
Persistent Volume Claim(PVC)
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cncf-pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
POD uses PVC to get
storage
PVC consumes PV
resources
PVC to PV binding is one to
one mapping
Public © confidential 11
Storage Class
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: cncf-ebs-sc
provisioner: kubernetes.io/aws-
ebs
parameters:
type: io1
iopsPerGB: "10"
fsType: ext4
Useful for Dynamic PV
provisioning
Known as profiles in
various storage systems
Use regional-pd for
replication of data between
two zones
Different options/features
supported by different
vendors
Public © confidential 12
HostPath
apiVersion: v1
kind: PersistentVolume
metadata:
name: cncf-demo-pv
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
Type of Persistent volume
Useful for non-prod
environment
Has several security risks
Not recommended for
Production
Uses a file or directory
on node
Public © confidential 13
Agenda
01
Stateful and
Stateless Workloads
04
Choosing the right
storage
02
Kubernetes
storage concepts
03
Kubernetes
Storage Options
05
Lesson learnt
06
Key Takeaways
Public © confidential 14
Cloud Native Storage Options
56 options as of 25th July 2021
Source: https://landscape.cncf.io/?category=cloud-native-storage&grouping=category
Public © confidential 15
Cloud Native Storage Options- CNCF Projects
Trivia: OpenEBS is used in production in CNCF.
Source: https://landscape.cncf.io/?category=cloud-native-storage&grouping=category
Public © confidential 16
Cloud Native Storage Options- Graduated Project
Only Graduated Project in Cloud Native Storage landscape
Source: https://landscape.cncf.io/?category=cloud-native-storage&grouping=category
Public © confidential 17
Types of Kubernetes Storage
1
2
3
Traditional Solution with CSI plug-in
Software Defined Storage (SDS) with
container optimization
Cloud native solutions
Public © confidential 18
Agenda
01
Stateful and
Stateless Workloads
04
Choosing the Right
Storage Option
02
Kubernetes
storage concepts
03
Storage fabric
options
05
Lesson learnt
06
Key Takeaways
Public © confidential 19
Decision Criteria
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Supports both VM and Containers
Supports Block, Object and Filesystems
Enterprise support available
Supports major cloud providers
Provides replication feature
Provides Async replication
Provides Sync replication
Provides deduplication and compression
Ease of deployment
Provides workload migration feature
High performance at scale
Point in time snapshot feature
QoS guarantee
Encryption at rest
Encryption in motion
Checksum error detection
Scales with Nodes
No Infra lock-in
Backup and recovery feature
Thin provisioning
Public © confidential 20
Agenda
01
Stateful and
Stateless Workloads
04
Choosing the right
storage
02
Kubernetes
storage concepts
03
Storage fabric
options
05
Lesson learnt
06
Key Takeaways
Public © confidential 21
Lesson Learnt
01
02
03
04
Shortlist max 5
solutions in the
beginning
Some limitations will
be known only during
the POC.
Subscription/licensing
of add-ons should be
considered in the
beginning itself.
Join Slack channel
to get faster support
Public © confidential 22
Common
Challenges
Public © confidential 23
Common Challenges
1
2
3
4
5
Fast changing area
Lack of support for VMs and Containers both
Error prone- command-line based steps
Lack of application awareness
Missing features around Replication and
Disaster recovery
Public © confidential 24
Agenda
01
Stateful and
Stateless Workloads
04
Choosing the right
storage
02
Kubernetes
storage concepts
03
Storage fabric
options
05
Lesson learnt
06
Key Takeaways
Public © confidential 25
Key Takeaways
03
Few vendors give their as-is commercial version
with several restrictions. This is usually a good
option for non-prod environments.
05
End to end Automation and GUI driven
configuration is not available in most of the
products
02
Most vendor supported products do not give
exact same commercial version features in
Open-source version
04
Give special consideration for performance
requirements
06
No “one size fits all” solution
Alignment with enterprise strategy, Enterprise
support and features are usually three main
decision criteria
01
Public © confidential 26
Wipro today
IT Services Revenue
in FY 2020-21*
Active
global clients*
Employee
Count*
Countries with
Employee presence*
$8.13 Bn 1120 66
197,712
*Figures based on FY 2020-21 for Global IT Services business.
Public
Thank you
for your time

Choosing the right storage for stateful workloads on Kubernetes

  • 1.
    Public Choosing Right Storage forKubernetes Abhinivesh Jain Distinguished Member of Technical Staff 12-Aug-2021
  • 2.
    Public © confidential2 About Me @AbhiniveshJain /abhiniveshjain Author, Speaker and Blogger Open Source “Contributor” Working as Distinguished Member of Technical Staff (DMTS)- Senior Member in CTO-5G Team in Wipro
  • 3.
    Public © confidential3 Agenda 01 Stateful and Stateless Workloads 02 Kubernetes storage concepts 03 Storage fabric options 04 Choosing the right storage 05 Lesson learnt 06 Key Takeaways
  • 4.
    Public © confidential4 01 Stateful and Stateless applications 04 Choosing the right storage 02 Kubernetes storage concepts 03 Storage fabric options 05 Lesson learnt 06 Key Takeaways Agenda
  • 5.
    Public © confidential5 Stateful Vs Stateless workloads 01 02 03 04 05 06 Kubernetes was originally built for stateless workloads Stateless workloads are not affected by POD restarts Stateful workload needs to preserve the state after POD restart Stateful workloads examples- Databases Stateful workloads requires use of permanent storage Stateful workloads is not same as Statefulsets
  • 6.
    Public © confidential6 Agenda 01 Stateful and Stateless Workloads 04 Choosing the right storage 02 Kubernetes storage concepts 03 Storage fabric options 05 Lesson learnt 06 Key Takeaways
  • 7.
    Public © confidential7 Kubernetes storage concepts 1 2 3 4 5 Volumes Persistent Volume (PV) Persistent Volume Claim (PVC) Storage Class hostPath
  • 8.
    Public © confidential8 K8s Storage concepts- Volume awsElasticBlockStore azureDisk azureFile cephfs cinder configMap downwardAPI emptyDir fc (fibre channel) gcePersistentDisk glusterfs hostPath iscsi local nfs persistentVolumeClaim portworxVolume projected quobyte rbd secret storageOS vsphereVolume Volume is a Directory 2 Types Ephemeral Volume Persistent Volume (PV) Ephemeral Volume- Lifetime of a POD Kubernetes supports several volume types
  • 9.
    Public © confidential9 Persistent Volume(PV) apiVersion: v1 kind: PersistentVolume metadata: name: cncf-demo-pv labels: type: local spec: storageClassName: manual capacity: storage: 1Gi accessModes: - ReadWriteOnce hostPath: path: "/mnt/data" Piece of storage Static or Dynamic Can use several different types of PV in same POD
  • 10.
    Public © confidential10 Persistent Volume Claim(PVC) apiVersion: v1 kind: PersistentVolumeClaim metadata: name: cncf-pv-claim spec: storageClassName: manual accessModes: - ReadWriteOnce resources: requests: storage: 1Gi POD uses PVC to get storage PVC consumes PV resources PVC to PV binding is one to one mapping
  • 11.
    Public © confidential11 Storage Class apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: cncf-ebs-sc provisioner: kubernetes.io/aws- ebs parameters: type: io1 iopsPerGB: "10" fsType: ext4 Useful for Dynamic PV provisioning Known as profiles in various storage systems Use regional-pd for replication of data between two zones Different options/features supported by different vendors
  • 12.
    Public © confidential12 HostPath apiVersion: v1 kind: PersistentVolume metadata: name: cncf-demo-pv labels: type: local spec: storageClassName: manual capacity: storage: 1Gi accessModes: - ReadWriteOnce hostPath: path: "/mnt/data" Type of Persistent volume Useful for non-prod environment Has several security risks Not recommended for Production Uses a file or directory on node
  • 13.
    Public © confidential13 Agenda 01 Stateful and Stateless Workloads 04 Choosing the right storage 02 Kubernetes storage concepts 03 Kubernetes Storage Options 05 Lesson learnt 06 Key Takeaways
  • 14.
    Public © confidential14 Cloud Native Storage Options 56 options as of 25th July 2021 Source: https://landscape.cncf.io/?category=cloud-native-storage&grouping=category
  • 15.
    Public © confidential15 Cloud Native Storage Options- CNCF Projects Trivia: OpenEBS is used in production in CNCF. Source: https://landscape.cncf.io/?category=cloud-native-storage&grouping=category
  • 16.
    Public © confidential16 Cloud Native Storage Options- Graduated Project Only Graduated Project in Cloud Native Storage landscape Source: https://landscape.cncf.io/?category=cloud-native-storage&grouping=category
  • 17.
    Public © confidential17 Types of Kubernetes Storage 1 2 3 Traditional Solution with CSI plug-in Software Defined Storage (SDS) with container optimization Cloud native solutions
  • 18.
    Public © confidential18 Agenda 01 Stateful and Stateless Workloads 04 Choosing the Right Storage Option 02 Kubernetes storage concepts 03 Storage fabric options 05 Lesson learnt 06 Key Takeaways
  • 19.
    Public © confidential19 Decision Criteria 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Supports both VM and Containers Supports Block, Object and Filesystems Enterprise support available Supports major cloud providers Provides replication feature Provides Async replication Provides Sync replication Provides deduplication and compression Ease of deployment Provides workload migration feature High performance at scale Point in time snapshot feature QoS guarantee Encryption at rest Encryption in motion Checksum error detection Scales with Nodes No Infra lock-in Backup and recovery feature Thin provisioning
  • 20.
    Public © confidential20 Agenda 01 Stateful and Stateless Workloads 04 Choosing the right storage 02 Kubernetes storage concepts 03 Storage fabric options 05 Lesson learnt 06 Key Takeaways
  • 21.
    Public © confidential21 Lesson Learnt 01 02 03 04 Shortlist max 5 solutions in the beginning Some limitations will be known only during the POC. Subscription/licensing of add-ons should be considered in the beginning itself. Join Slack channel to get faster support
  • 22.
    Public © confidential22 Common Challenges
  • 23.
    Public © confidential23 Common Challenges 1 2 3 4 5 Fast changing area Lack of support for VMs and Containers both Error prone- command-line based steps Lack of application awareness Missing features around Replication and Disaster recovery
  • 24.
    Public © confidential24 Agenda 01 Stateful and Stateless Workloads 04 Choosing the right storage 02 Kubernetes storage concepts 03 Storage fabric options 05 Lesson learnt 06 Key Takeaways
  • 25.
    Public © confidential25 Key Takeaways 03 Few vendors give their as-is commercial version with several restrictions. This is usually a good option for non-prod environments. 05 End to end Automation and GUI driven configuration is not available in most of the products 02 Most vendor supported products do not give exact same commercial version features in Open-source version 04 Give special consideration for performance requirements 06 No “one size fits all” solution Alignment with enterprise strategy, Enterprise support and features are usually three main decision criteria 01
  • 26.
    Public © confidential26 Wipro today IT Services Revenue in FY 2020-21* Active global clients* Employee Count* Countries with Employee presence* $8.13 Bn 1120 66 197,712 *Figures based on FY 2020-21 for Global IT Services business.
  • 27.