Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Stateful Applications mit Kubernetes
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Nicolas Byl
September 21, 2017
Technology
73
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Stateful Applications mit Kubernetes
Nicolas Byl
September 21, 2017
More Decks by Nicolas Byl
See All by Nicolas Byl
Platform Engineering ❤️ Developer Experience
nbyl
0
53
Die Flucht aus der Prototypen-Hölle
nbyl
0
57
Lean Prototyping for Industrial-IoT Projects
nbyl
0
76
DevSecOps - Vom Unikum zur gut geölten Maschine
nbyl
0
120
Securing your software supply chain
nbyl
0
390
Keeping-Up-WithUpstream.pdf
nbyl
0
190
Dr. Kube und der Helm - Anatomie einer CD-Pipeline
nbyl
0
150
Securing the "other" supply chain
nbyl
0
320
Kubernetes - Auf die Cluster, Fertig, Los!
nbyl
0
220
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/3 - 2026/5
oracle4engineer
PRO
1
200
データ基盤をDataformで整えた話 〜 開発環境を添えて 〜
takapy
0
120
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
140
Claude code Orchestra
ozakiomumkj
3
980
PHP と TypeScript の型システム比較:AI 時代の「型」は誰のためにあるのか? #frontend_phpcon_do / frontend_phpcon_do_2026
shogogg
1
260
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
1.2k
noUncheckedIndexedAccess、3時間、1万円。 / noUncheckedIndexedAccess, 3 Hours, 10,000 JPY.
kaonavi
1
310
Building applications in the Gemini API family.
line_developers_tw
PRO
0
1.9k
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
190
React、まだ楽しくて草
uhyo
7
4.1k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
50k
「嘘をつくテスト」の失敗例から学ぶ 良いテストコード #frontend_phpcon_do
asumikam
0
510
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
190
Color Theory Basics | Prateek | Gurzu
gurzu
0
350
Writing Fast Ruby
sferik
630
63k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
200
The Art of Programming - Codeland 2020
erikaheidi
57
14k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
720
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Agile that works and the tools we love
rasmusluckow
331
21k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
30 Presentation Tips
portentint
PRO
1
320
Transcript
STATEFUL APPLICATIONS MIT KUBERNETES BED-CON 2017 Nicolas Byl, codecentric AG
1
2
PERSISTENT APPLICATION STATE 3 . 1
GOALS Scalable Highly Available Fault Tolerance 3 . 2
EXAMPLE ARCHITECTURE 3 . 3
CANDIDATES MySQL PostgreSQL Cassandra MongoDB Kafka … 3 . 4
KUBERNETES 4 . 1
DESIGN PHILOSOPHY portable: public, private, hybrid, multi-cloud extensible: modular, pluggable,
hookable, composable self-healing: auto-placement, auto-restart, auto-replication, auto-scaling 4 . 2
PODS 4 . 3
SERVICES 4 . 4
PERSISTENT VOLUMES 5 . 1
5 . 2
GCEPersistentDisk CephFS AWSElasticBlockStore Cinder (OpenStack block storage) AzureFile Glusterfs AzureDisk
VsphereVolume FC (Fibre Channel) Quobyte Volumes FlexVolume HostPath Flocker VMware Photon
NFS vPortworx Volumes iSCSI ScaleIO Volumes RBD (Ceph Block Device)
StorageOS 5 . 3
ACCESS MODES ReadWriteOnce – the volume can be mounted as
read-write by a single node ReadOnlyMany – the volume can be mounted read-only by many nodes ReadWriteMany – the volume can be mounted as read-write by many nodes 5 . 4
USAGE Provision Disk Create Persistent Volume Create Persistent Volume Claim
Mount Claim in Pod 5 . 5
PERSISTENT VOLUME apiVersion: v1 kind: PersistentVolume metadata: name: pv0003 spec:
capacity: storage: 5Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Recycle nfs: path: /tmp server: 172.17.0.2 5 . 6
PERSISTENT VOLUME CLAIM kind: PersistentVolumeClaim apiVersion: v1 metadata: name: myclaim
spec: accessModes: - ReadWriteOnce resources: requests: storage: 8Gi 5 . 7
MOUNTING A PVC kind: Pod apiVersion: v1 metadata: name: mypod
spec: containers: - name: mydatabase image: mysql:5.7 volumeMounts: - mountPath: "/var/lib/mysql" name: mypd volumes: - name: mypd persistentVolumeClaim: claimName: myclaim 5 . 8
COMMON PITFALLS The abstraction is leaky. Local storage vs. SAN
storage vs. Network Filesystems 5 . 9
AUTO-PROVISIONING 6 . 1
AUTO-PROVISIONING Manual creation of Persistent Volumes is error-prone. Does not
scale well. 6 . 2
STORAGECLASS kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: standard provisioner: kubernetes.io/aws-ebs
parameters: type: gp2 6 . 3
USING A STORAGECLASS kind: PersistentVolumeClaim apiVersion: v1 metadata: name: myclaim
spec: accessModes: - ReadWriteOnce resources: requests: storage: 8Gi storageClassName: standard 6 . 4
SUPPORTED PROVISIONERS default volume plugins (in-tree provisioners) out-of-tree provisioners community
provisioners: write your own: https://github.com/kubernetes- incubator/external-storage https://github.com/kubernetes- incubator/external- storage/tree/master/docs/demo/hostpath-provisioner 6 . 5
SCALING 7 . 1
ARCHITECTURE REVISITED 7 . 2
SHARING PVCS Need different paths per Pod. Share needs to
be available on every host. Corruption of file system affects all database nodes. Sharing a Persistent Volume Claim is not a good idea. 7 . 3
STATEFUL SETS 8 . 1
STATEFULSETS Pod template mechanism Hostnames are atomically increased: pod-0 pod-1
… Volume Claims can be provisioned on-the-fly 8 . 2
STATEFULSET EXAMPLE apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: web spec:
serviceName: "nginx" replicas: 2 template: metadata: labels: app: nginx spec: containers: - name: nginx image: gcr.io/google_containers/nginx-slim:0.8 ports: - containerPort: 80 name: web volumeMounts: 8 . 3
ARCHITECTURE STATEFULSETS 8 . 4
WRAP UP 9 . 1
LINKS Persistent Volumes: Tutorial StatefulSet: Demos: https://kubernetes.io/docs/concepts/storage/persistent- volumes https://kubernetes.io/docs/tutorials/stateful-application/basic- stateful-set/
https://goo.gl/NCnzq8 9 . 2
THE END Copyright 2017 @NicolasByl 9 . 3