SlideShare une entreprise Scribd logo
1  sur  49
Télécharger pour lire hors ligne
Kafka on Kubernetes
@uma_mukkara
@ksatchit
22 December 2019
Cloud Native Data Management and Chaos Engineering for
Kafka
Apache Kafka and stream processing meetup @ Walmart
Agenda
● Cloud-Native environments - Quick Recap
● Kafka challenges
○ Data persistence
○ Resilience
● Introduce OpenEBS
● Introduce Litmus
● Demo
2
3
Uma Mukkara
Co-Founder & COO
@uma_mukkara
Open source projects
About your speakers
Karthik S
Core Maintainer, Litmus
@ksatchit
Cloud Native Environments
(Introduction)
Cloud Native Environments
5
Systemic changes in software industry
6
Developer
Manual
Tester
Automation
Tester
System
Engineer
Admins
DevOps
Operations
Architects
Systemic changes in software industry
7
Developer
Manual
Tester
Automation
Tester
System
Engineer
Admins
DevOps
Operations
Architects
SRE
Cloud Native Environments
● DevOps agility
○ Quick to Develop
○ Quick to Deploy
○ Faster feedback
○ Shift-Left
● DevOps
○ GitOps
○ DataOps
8
Goals Environment
9
Cloud Native Environments
10
Cloud Native Environments
Kafka Challenges
in Cloud Native Environments
● Data Challenges
● Resilience Challenges
Confluent Operator
12
Scaling
● Confluent operator simplifies installation and provisioning
● How to scale?
13
Operator.YAML
Operator
LocalPV
Kafka Broker
LocalPV
Kafka Broker
LocalPV
Kafka Broker
LocalPV
Kafka Broker
replicas : n++
Data Persistence challenges
14
● Ephemeral nodes
● Capacity based scheduling
● Reuse of disks
● Unavailability of disks or disk space
○ Auto provisioning of disks and then localpv
● Scaling down
Basic provisioning can be done statically or
some automation. But what about:
Data Persistence challenges
15
Ephemeral nodes
?
Data Persistence challenges
16
Capacity based scheduling
200G 500G
Operator
Scale = +1
LocalPV
Provisioner
? ?
Data Persistence challenges
17
Reuse of disks? Disk protection
New PVC request
Disk
Data Persistence challenges
18
Unavailability of disks Operator
Scale = +1
LocalPV
Provisioner
? ?
Solution
19
Use OpenEBS LocalPV
OpenEBS
(Introduction)
Kubernetes is great for
Stateless applications and app
components, so why not use it
to orchestrate stateful apps?
Applications have
changed and someone
forgot to tell storage
So MayaData put the storage
array inside K8s with OpenEBS,
and now devs can do their own
storage management.
OpenEBS
24
• Most active community in the Container Attached Storage space
• GitHub: https://github.com/openebs/openebs
• Website: https://openebs.io/
• Slack: https://slack.openebs.io
• Twitter: https://twitter.com/openebs
• Overall 350+ Code contributors (https://devstats.openebs.io/)
• 1400+ Slack Members, 600+ Forks, 6000+ stars
• 1.0 released in June
• Deployed in 100s of clusters every week.
• Kubernetes Native, 100% Userspace
OpenEBS NDM
25
● NDM runs as a
daemonset and
maintains the block
devices as CRs
● NDM operator links
north bound and
sound bound
interfaces
Application
Developer PVC
OpenEBS LocalPV
Provisioner
OpenEBS cStor/Jiva
volume Provisioner
cStor Pool
Provisioner
NDM Operator
NDM Sound bound
provisioner
CSI Drivers
OpenStack VSAN OpenSDS Legacy
(NetApp/Pure)
Block devices
in etcd Director
(DataOps)
Auto provisioning
of disks
VSANEBS/GPD/
Azure Disks
Any CSI driver
● Complete disk
management
including auto
provisioning to
smoothen the data
ops
● Data mobility
becomes easier with
auto provisioning on
remote clouds
OpenEBS Architecture
26
K8s api
Maya api
Browser
/
Terminal
---
kubectl
NDM
for underlying
block dev
discovery
Block
devices
OpenEBS
Provisioner
For disk setup
OpenEBS CRDs
} OpenEBS cStor Storage Pool
PVC
PV
POD
etcd
SnapClone
} OpenEBS LocalPV
PVC
PV
POD
Node 1
Node 2
Node 3
Node 4
Summary - OpenEBS LocalPV
27
● Ephemeral nodes
● Capacity based scheduling
● Reuse of disks
● Unavailability of disks or disk space
○ Auto provisioning of disks and then localpv
● Scaling down
Node Disk Manager and a bunch of operators
to solve the following problems:
Resilience challenges for Kafka
(Introduction)
Introducing Chaos Engineering
Reliability
● Reliability is too important. Outages of services costs $$$
29
Chaos Engineering
● Practice chaos engineering to increase resiliency
Resiliency Achieved by
CI Pipelines
Functional
Tests
Failure Tests
+
Achieved by
Staging / Production
Good CI
Random
Chaos+
30
Chaos Engineering Loop
* Images and content authored by: Mark McBride, Turbine Labs
31
Cloud-Native environment
● My code is 1%. Rest is not controlled by me.
● Linux is the least dynamic stack
● Rest is all microservices, based - highly dynamic CHAOS ENGINEERING
Then, how to achieve Resilience ?
32
Cloud-Native Chaos Engineering
Cloud Native
APIs
POD Deployment
PVC Statefulset
SVC CRDs
For
Development
For Chaos Testing
Cloud Native
APIs
?
Cloud-native
Application
33
Cloud Native
APIs
POD Deployment
PVC Statefulset
SVC CRDs
For Chaos Testing
Cloud Native
APIs
Chaos
Engine
Chaos
Experiment
Chaos Result
New CRDs
Cloud-native
Application
For
Development
Cloud-Native Chaos Engineering
34
Cloud-Native Chaos Engineering
apiVersion: v1
kind: Pod
metadata:
name: percona-pod
labels:
app: percona
spec:
containers:
- name: percona
image: percona:2.4
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
Name: demo-vol1-claim
spec:
storageClassName:
openebs-jiva-default
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5G
Create POD
Create PV
Inject Chaos
Cloud Native
Developer
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-percona
spec:
appinfo:
appns: default
applabel: "app=percona"
experiments:
- name: replica-kill
spec:
components:
- name: read-only
spec:
components:
35
● Leading open source project for Chaos Engineering on
Kubernetes
● Apache2 License
● https://github.com/litmuschaos
● 50+ contributors
● 450+ stars
● CNCF Landscape - https://landscape.cncf.io/selected=litmus
● Chaos Hub https://hub.litmuschaos.io/
● CNCF Blog
https://www.cncf.io/blog/2019/11/06/cloud-native-chaos-engineering
-enhancing-kubernetes-application-resiliency/
Introducing Litmus
36
LitmusChaos
www.litmuschaos.io
37
ChaosHub
hub.litmuschaos.io
38
How Litmus works
39
Chaos
Libraries
hub.litmuschaos.io
Chaos
Operator
helm install litmuschaos/litmus
Chaos
Charts
App
container
Chaos
container
Install Litmus
Install Charts
Inject Chaos
Resilience for Kafka
40
https://hub.litmuschaos.io
What can you do?
41
● Join OpenEBS and Litmus slack to keep in touch
● Try using OpenEBS for Kafka and provide feedback
○ Open Source Karma
● Try using Litmus for Kafka
● Create issues for
○ Your challenges related to data
○ More chaos scenarios
Open Source Karma
42
● Like OpenEBS ?
○ https://bit.ly/staropenebs
● Like Litmus?
○ https://bit.ly/starlitmus
Help yourself with some cool stickers
Demo
Quick Look at the setup
44
Broker Broker Broker Broker
Konvoy with OpenEBS LocalPV
A Quick Kafka Refresher
● Kafka is the current go-to solution for building maintainable, extendable and scalable data
pipelines.
● Applications (producers) send (publish) messages (records) to a Kafka node (broker) and
said messages are processed by other applications (consumers).
● Said messages get stored in a topic and consumers subscribe to the topic to receive new
messages.
● Topics are broken down into partitions, for better performance & scalability. These partitions
consist of ordered data units identified by their offsets.
● The partitions are often replicated with one broker owning it (handle writes), called Leader
Broker with data replicated written into followers.
● A Controller Broker manages the administrative tasks to topic creation, leader assignments,
failover to in-sync replicas etc.,
● Kafka Cluster State is typically maintained in ZooKeeper (a distributed key value store), with
brokers keep a ZooKeeper watch to know events.
Kafka Chaos Experiment: Kill the Kafka Broker Pod
● Objective: Test the deployment sanity of the Stateful Kafka Cluster
● Approach: Setup a liveness message stream with test producer/consumer & specify a
message timeout. Identify a partition leader & kill the pod. Verify if the liveness stream is
un-interrupted
● Health Checks: Verify broker list via ZooKeeper
● Tools: Litmus Chaos Operator & Kafka Chaos Experiment Chart
● Tested: CP-Kafka, Kudo-Kafka
Kafka Chaos Experiment: Kill the Kafka Broker Pod
Lets see it in action

Contenu connexe

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Kafka on Kubernetes (Uma Mukkar - Mayadata)

  • 1. Kafka on Kubernetes @uma_mukkara @ksatchit 22 December 2019 Cloud Native Data Management and Chaos Engineering for Kafka Apache Kafka and stream processing meetup @ Walmart
  • 2. Agenda ● Cloud-Native environments - Quick Recap ● Kafka challenges ○ Data persistence ○ Resilience ● Introduce OpenEBS ● Introduce Litmus ● Demo 2
  • 3. 3 Uma Mukkara Co-Founder & COO @uma_mukkara Open source projects About your speakers Karthik S Core Maintainer, Litmus @ksatchit
  • 6. Systemic changes in software industry 6 Developer Manual Tester Automation Tester System Engineer Admins DevOps Operations Architects
  • 7. Systemic changes in software industry 7 Developer Manual Tester Automation Tester System Engineer Admins DevOps Operations Architects SRE
  • 8. Cloud Native Environments ● DevOps agility ○ Quick to Develop ○ Quick to Deploy ○ Faster feedback ○ Shift-Left ● DevOps ○ GitOps ○ DataOps 8 Goals Environment
  • 11. Kafka Challenges in Cloud Native Environments ● Data Challenges ● Resilience Challenges
  • 13. Scaling ● Confluent operator simplifies installation and provisioning ● How to scale? 13 Operator.YAML Operator LocalPV Kafka Broker LocalPV Kafka Broker LocalPV Kafka Broker LocalPV Kafka Broker replicas : n++
  • 14. Data Persistence challenges 14 ● Ephemeral nodes ● Capacity based scheduling ● Reuse of disks ● Unavailability of disks or disk space ○ Auto provisioning of disks and then localpv ● Scaling down Basic provisioning can be done statically or some automation. But what about:
  • 16. Data Persistence challenges 16 Capacity based scheduling 200G 500G Operator Scale = +1 LocalPV Provisioner ? ?
  • 17. Data Persistence challenges 17 Reuse of disks? Disk protection New PVC request Disk
  • 18. Data Persistence challenges 18 Unavailability of disks Operator Scale = +1 LocalPV Provisioner ? ?
  • 21. Kubernetes is great for Stateless applications and app components, so why not use it to orchestrate stateful apps?
  • 22. Applications have changed and someone forgot to tell storage
  • 23. So MayaData put the storage array inside K8s with OpenEBS, and now devs can do their own storage management.
  • 24. OpenEBS 24 • Most active community in the Container Attached Storage space • GitHub: https://github.com/openebs/openebs • Website: https://openebs.io/ • Slack: https://slack.openebs.io • Twitter: https://twitter.com/openebs • Overall 350+ Code contributors (https://devstats.openebs.io/) • 1400+ Slack Members, 600+ Forks, 6000+ stars • 1.0 released in June • Deployed in 100s of clusters every week. • Kubernetes Native, 100% Userspace
  • 25. OpenEBS NDM 25 ● NDM runs as a daemonset and maintains the block devices as CRs ● NDM operator links north bound and sound bound interfaces Application Developer PVC OpenEBS LocalPV Provisioner OpenEBS cStor/Jiva volume Provisioner cStor Pool Provisioner NDM Operator NDM Sound bound provisioner CSI Drivers OpenStack VSAN OpenSDS Legacy (NetApp/Pure) Block devices in etcd Director (DataOps) Auto provisioning of disks VSANEBS/GPD/ Azure Disks Any CSI driver ● Complete disk management including auto provisioning to smoothen the data ops ● Data mobility becomes easier with auto provisioning on remote clouds
  • 26. OpenEBS Architecture 26 K8s api Maya api Browser / Terminal --- kubectl NDM for underlying block dev discovery Block devices OpenEBS Provisioner For disk setup OpenEBS CRDs } OpenEBS cStor Storage Pool PVC PV POD etcd SnapClone } OpenEBS LocalPV PVC PV POD Node 1 Node 2 Node 3 Node 4
  • 27. Summary - OpenEBS LocalPV 27 ● Ephemeral nodes ● Capacity based scheduling ● Reuse of disks ● Unavailability of disks or disk space ○ Auto provisioning of disks and then localpv ● Scaling down Node Disk Manager and a bunch of operators to solve the following problems:
  • 28. Resilience challenges for Kafka (Introduction) Introducing Chaos Engineering
  • 29. Reliability ● Reliability is too important. Outages of services costs $$$ 29
  • 30. Chaos Engineering ● Practice chaos engineering to increase resiliency Resiliency Achieved by CI Pipelines Functional Tests Failure Tests + Achieved by Staging / Production Good CI Random Chaos+ 30
  • 31. Chaos Engineering Loop * Images and content authored by: Mark McBride, Turbine Labs 31
  • 32. Cloud-Native environment ● My code is 1%. Rest is not controlled by me. ● Linux is the least dynamic stack ● Rest is all microservices, based - highly dynamic CHAOS ENGINEERING Then, how to achieve Resilience ? 32
  • 33. Cloud-Native Chaos Engineering Cloud Native APIs POD Deployment PVC Statefulset SVC CRDs For Development For Chaos Testing Cloud Native APIs ? Cloud-native Application 33
  • 34. Cloud Native APIs POD Deployment PVC Statefulset SVC CRDs For Chaos Testing Cloud Native APIs Chaos Engine Chaos Experiment Chaos Result New CRDs Cloud-native Application For Development Cloud-Native Chaos Engineering 34
  • 35. Cloud-Native Chaos Engineering apiVersion: v1 kind: Pod metadata: name: percona-pod labels: app: percona spec: containers: - name: percona image: percona:2.4 kind: PersistentVolumeClaim apiVersion: v1 metadata: Name: demo-vol1-claim spec: storageClassName: openebs-jiva-default accessModes: - ReadWriteOnce resources: requests: storage: 5G Create POD Create PV Inject Chaos Cloud Native Developer apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-percona spec: appinfo: appns: default applabel: "app=percona" experiments: - name: replica-kill spec: components: - name: read-only spec: components: 35
  • 36. ● Leading open source project for Chaos Engineering on Kubernetes ● Apache2 License ● https://github.com/litmuschaos ● 50+ contributors ● 450+ stars ● CNCF Landscape - https://landscape.cncf.io/selected=litmus ● Chaos Hub https://hub.litmuschaos.io/ ● CNCF Blog https://www.cncf.io/blog/2019/11/06/cloud-native-chaos-engineering -enhancing-kubernetes-application-resiliency/ Introducing Litmus 36
  • 39. How Litmus works 39 Chaos Libraries hub.litmuschaos.io Chaos Operator helm install litmuschaos/litmus Chaos Charts App container Chaos container Install Litmus Install Charts Inject Chaos
  • 41. What can you do? 41 ● Join OpenEBS and Litmus slack to keep in touch ● Try using OpenEBS for Kafka and provide feedback ○ Open Source Karma ● Try using Litmus for Kafka ● Create issues for ○ Your challenges related to data ○ More chaos scenarios
  • 42. Open Source Karma 42 ● Like OpenEBS ? ○ https://bit.ly/staropenebs ● Like Litmus? ○ https://bit.ly/starlitmus Help yourself with some cool stickers
  • 43. Demo
  • 44. Quick Look at the setup 44 Broker Broker Broker Broker Konvoy with OpenEBS LocalPV
  • 45. A Quick Kafka Refresher ● Kafka is the current go-to solution for building maintainable, extendable and scalable data pipelines. ● Applications (producers) send (publish) messages (records) to a Kafka node (broker) and said messages are processed by other applications (consumers). ● Said messages get stored in a topic and consumers subscribe to the topic to receive new messages. ● Topics are broken down into partitions, for better performance & scalability. These partitions consist of ordered data units identified by their offsets. ● The partitions are often replicated with one broker owning it (handle writes), called Leader Broker with data replicated written into followers. ● A Controller Broker manages the administrative tasks to topic creation, leader assignments, failover to in-sync replicas etc., ● Kafka Cluster State is typically maintained in ZooKeeper (a distributed key value store), with brokers keep a ZooKeeper watch to know events.
  • 46.
  • 47. Kafka Chaos Experiment: Kill the Kafka Broker Pod ● Objective: Test the deployment sanity of the Stateful Kafka Cluster ● Approach: Setup a liveness message stream with test producer/consumer & specify a message timeout. Identify a partition leader & kill the pod. Verify if the liveness stream is un-interrupted ● Health Checks: Verify broker list via ZooKeeper ● Tools: Litmus Chaos Operator & Kafka Chaos Experiment Chart ● Tested: CP-Kafka, Kudo-Kafka
  • 48. Kafka Chaos Experiment: Kill the Kafka Broker Pod
  • 49. Lets see it in action