Kubeinvaders is a chaos engineering tool for Kubernetes that has both a game mode and programming mode. The game mode allows users to kill pods randomly in a space invaders-style game, while the programming mode allows users to define and run chaos experiments and load tests. It includes features like a chaos programming console to control and view metrics of chaos jobs, and presets for common chaos experiments. It aims to help test the resilience of Kubernetes clusters.
1. Kubeinvaders & Chaos Engineering practices for Kubernetes
Eugenio Marzo - CKA, Vault Associate
FOSDEM 2023
2. Agenda
● Definition of Chaos Engineering
● k-inv - game and programming mode
● Chaos Programming Console
● Community Links
3. Definition of Chaos Engineering
● ChaosMonkey
● Litmuschaos
● ChaosMesh
● ChaosToolkit
● Kubedoom
Chaos Engineering is the discipline of experimenting
on a system in order to build confidence in the
system’s capability to withstand turbulent conditions
in production (https://principlesofchaos.org/)
● Test the resilience of a distributed system
● Trigger controlled alerts for testing monitoring systems
Tools
Use cases
Definition
4. Monitoring system exposes tons of metrics. All are important,
but what are definitely significant?
Use Case - Metrics Selection
5. Sometime too many metrics and alerts can confuse SysOps
teams. There is not clarity of what is important for a first-level
monitoring system.
Use Case - Metrics Selection
6. Chaos Engineering is a discipline for stressing systems and see
how they are resilient and rock-solid. But, can it help us to solve
our problem?
Stressing systems reliability == Producing controlled alerts
Use Case - Metrics Selection
8. Running Chaos Mesh we saw some interesting Alerts and related Metrics from Prometheus
console:
MEM Attack (/usr/local/chaosd-v1.0.0-linux-amd64/tools/stress-ng --vm 2 --vm-bytes 15G)
● etcdMembersDown
● etcdNoLeader
● TargetDown
● KubeClientErrors
● ExtremelyHighIndividualControlPlaneCPU
Disk Attack - ./chaosd attack disk fill -s95G -p /var/lib/containers/foo.bar
● NodeFilesystemAlmostOutOfSpace
CPU Attack - ./chaosd attack stress cpu -w 4
● etcdMemberCommunicationSlow
● etcdHighCommitDurations
● KubePodNotReady
● HighOverallControlPlaneCPU
Network Fault - Delay 3s
● TargetDown
● KubeAPIErrorBudgetBurn
9. What is k-inv
Chaos Engineering tool for Kubernetes. It is composed by a game part (space-invaders
imitation for killing pods) and a chaos programming console
● Kill pods randomly and start chaos jobs against worker and master nodes
● Define and run chaos experiments and load testing
Features
Definition