Kafka on Kubernetes: Does it have to be the hard way? february / Atlanta, GA 2019 @gamussa @gamussa
|| #devnexus #devnexus
||
@ConfluentINc @ConfluentINc
Slide 2
2
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 3
3
I build highly scalable Hello World apps @gamussa
|
#devnexus
|
@ConfluentINc
11
Who run stateless apps in Kubernetes?
🙋
Who thinks it’s a good idea? Who run stateful apps in Kubernetes? Who thinks it’s a good idea? @gamussa
|
#devnexus
|
@ConfluentINc
22
Pod • Basic Unit of Deployment in Kubernetes • A collection of containers sharing: • Namespace • Network • Volumes @gamussa
|
#devnexus
|
@ConfluentINc
Slide 23
23
Storage • Persistent Volume (PV) & Persistent Volume Claim (PVC) • PV is a piece of storage that is provisioned dynamic or static of any individual pod that uses the PV
@gamussa
|
#devnexus
|
@ConfluentINc
28
Provisioning storage in Kubernetes Kubernetes controller
Storage System
Kubernetes node
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 29
29
Provisioning storage in Kubernetes The controller requests storage system to attach volume
Kubernetes controller
Storage System
Kubernetes node
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 30
30
Provisioning storage in Kubernetes The storage system attaches the volume
Kubernetes controller
Storage System
Kubernetes node
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 31
31
Provisioning storage in Kubernetes Kubelet requests storage system to mount Volume
Kubernetes controller
Storage System
Kubernetes node
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 32
32
Provisioning storage in Kubernetes Kubelet can now request container runtime to bind mount the volume into the requested path in the container.
Kubernetes controller
Storage System
Kubernetes node /var/lib
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 33
33
But I just want to deploy kafka @gamussa
|
#devnexus
|
@ConfluentINc
Slide 34
Slide 35
35
Confluent Operator: Apache Kafka on Kubernetes made simple
Confluent Platform Docker Images
Run Apache Kafka and Confluent
Confluent Operator
Platform as a cloud-native application on Kubernetes to minimize operating complexity and
Kubernetes AWS
Azure
GCP
RH OpenShift
Mesosphere
Pivotal
increase developer agility On-Premises
@gamussa
|
#devnexus
|
@ConfluentINc
Cloud
Slide 36
Custom resource controller
Slide 37
37
a custom Kubernetes controller PODS
API Server
StatefulSets
PVs
Controllers & Custom Controllers
Custom Resources
Master Node
Worker Node
|
Applications run on Kubernetes ● Applications use objects like StatefulSets, Configmaps, PVs ● Custom Controllers create custom resources that provide unique application functionality:
ConfigMaps
Scheduler
@gamussa
● Nodes and pods are where
#devnexus
|
@ConfluentINc
○
Upgrades, elasticity, Kafka Operational Logic
47
Helm Charts is just a GO Templates. How Charts help with rolling update?
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 48
48
We will use StatefulSets with OrderedReady
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 49
49
We need SRE / Operator knowledge to manage the platform. You need Operator!
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 50
50
@gamussa
|
#devnexus
|
@ConfluentINc
Slide 51
Rolling Upgrade Kafka Broker Upgrades: 1. Stop the broker, upgrade Kafka 2. Wait for Partition Leader reassignment 3. Start the upgraded broker 4. Wait for zero under-replicated partitions 5. Upgrade the next broker
Slide 52
52
Will it Scale Spin up new brokers, connect workers easily Manual Rebalance required in v1.0 Determine balancing plan Execute balancing plan Monitor Resources
@gamussa
|
#devnexus
|
@ConfluentINc