Hellmar Becker, Senior Sales Engineer, Confluent
Title of Talk:
Orchestrate Apache Kafka® on Kubernetes
Abstract:
Many organisations have adopted micro- services architectures to evolve their systems away from the slow and unresponsive shared-state architectures of the past. Apache Kafka is often chosen to be the backbone for these event driven services.
While the main drivers for adopting micro-services architectures are to improve speed and agility for the development of applications, it also inherently increases operational complexity due to its distributed nature. To deal with that, many have encountered the need for systems that help automate and manage their micro-services deployment; adopting container technologies like Docker and orchestration frameworks like Kubernetes along the way.
https://www.meetup.com/Apache-Kafka-Germany-Munich/events/265114406/
2. 2
About Me
● Hellmar Becker
● Systems Engineer @ Confluent
● Formerly at Hortonworks, ING Bank (Amsterdam),
IBM
● Lives near Munich
● Github: github.org/hellmarbecker
● Twitter: @Hellmar_Becker
7. @@Hellmar_Becker | @confluentinc
Don’t despair…
“… not even over the fact that you don't
despair.
Just when everything seems over with,
new forces come marching up, and
precisely that means that you are alive”
Franz Kafka
25. @@Hellmar_Becker | @confluentinc
StatefulSet
Rely on Headless Service to
provide network identity
Ideal for highly available
stateful workloads
Headless Service
Pod-0
Containers
Volumes
Pod-1
Containers
Volumes
Pod-2
Containers
Volumes
33. @@Hellmar_Becker | @confluentinc
Kafka deployment checklist
PVC for Storage
StatefulSet for 3-node zk
Optional Pod Anti-Affinity to spread the ZK
ensemble across nodes
Headless Service
ConfigMap for Prometheus JMX exporter
Uses ZK Headless Svc
PVC for Storage
StatefulSet for n-node Kafka
A group of NodePort Services for external
traffic
ConfigMap for Prometheus JMX exporter
36. @@Hellmar_Becker | @confluentinc
Kubernetes Operator
Embedded with operational
knowledge of both data software
and Kubernetes
⦁ Backup/restore
⦁ Scale up/down
⦁ Rebalance data
⦁ Regular health checks
39. @@Hellmar_Becker | @confluentinc
Custom Resource Definition(CRD)
Usually works together
Custom Controller StatefulSet ReplicaSet CRD...API
StatefulSet
Controller
ReplicaSet
Controller
Custom
Controller
Controller
StatefulSet ReplicaSet
Custom
Resource
Instance
...
...
40. @@Hellmar_Becker | @confluentinc
Custom Resource Definition(CRD)
Users can create and
access Customer
Resources with kubectl,
just as they do for built-
in resources like pods.
StatefulSet ReplicaSet CRD...API
StatefulSet
Controller
ReplicaSet
Controller
Custom
Controller
Controller
StatefulSet ReplicaSet
Custom
Resource
Instance
...
...
44. @@Hellmar_Becker | @confluentinc
Confluent Operator: Scale Horizontally
Automate scaling:
Spin up new broker pod(s)
Distribute partitions to the new
broker(s)
Determine balancing plan
Execute balancing plan
Monitor resources
45. @@Hellmar_Becker | @confluentinc
Confluent Operator: Rolling Upgrade
Automated rolling upgrade with
no downtime for Kafka.
Stop broker
Wait for leader election to
complete
Start broker with new version
Wait for zero under-replicated-
partitions
Repeat
47. @@Hellmar_Becker | @confluentinc
Confluent Operator
Automate provisioning
Monitor SLAs through
Confluent Control Center
or Prometheus
Scale your Kafkas and CP
clusters elastically
Operate at scale with
enterprise support from
Confluent