Gamified chaos engineering tool for Kubernetes. It is like Space Invaders but the aliens are pods or worker nodes.
- Description
- Installation
- Usage
- Known Problems
- Metrics
- Security
- Community
- Community blogs and videos
- License
Through KubeInvaders you can stress a Kubernetes cluster in a fun way and check how it is resilient.
helm repo add kubeinvaders https://lucky-sideburn.github.io/helm-charts/
kubectl create namespace kubeinvaders
helm install kubeinvaders --set-string target_namespace="namespace1\,namespace2" \
-n kubeinvaders kubeinvaders/kubeinvaders --set ingress.hostName=kubeinvaders.io --set image.tag=v1.9
At the top you will find some metrics as described below:
Current Replicas State Delay is a metric that show how much time the cluster takes to coming back at the desired state of pods replicas.
This is a control-plane you can use to switch off & on various features.
Press the button "Start" to start automatic pilot (button changes to "Stop" to disable this feature).
Press the button "Enable Shuffle" to switch randomly the positions of pods or k8s nodes (button changes to "Disable Shuffle" to disable this feature).
Press the button "Auto NS Switch" to switch randomly between namespaces (button changes to "Disable Auto NS Switch" to disable this feature).
Press the button "Hide Pods Name" to hide the name of the pods under the aliens (button changes to "Show Pods Name" to disable this feature).
As described below, on the game screen, near the spaceship, there are details about current cluster, namespace and some configurations.
Under + and - buttons appears a bar with the latest occurred game events.
It is possibile using kube-linter through KubeInvaders in order to scan resources looking for best-practices or improvements to apply.
Press 'h' or select 'Show Special Keys' from the menu.
Press + or - buttons to increase or decrease the game screen.
-
Select from the menu "Show Current Chaos Container for nodes" for watching which container start when you fire against a worker node (not an alien, they are pods).
-
Select from the menu "Set Custom Chaos Container for nodes" for using your preferred image or configuration against nodes.
- It seems that KubeInvaders does not work with EKS because of problems with ServiceAccount. Work in progress!
To experience KubeInvaders in action, try it out in this free O'Reilly Katacoda scenario, KubeInvaders.
KubeInvaders exposes metrics for Prometheus through the standard endpoint /metrics
This is an example of Prometheus configuration
scrape_configs:
- job_name: kubeinvaders
static_configs:
- targets:
- kubeinvaders.kubeinvaders.svc.cluster.local:8080
Example of metrics
Metric | Description |
---|---|
chaos_jobs_node_count{node=workernode01} | Total number of chaos jobs executed per node |
chaos_node_jobs_total | Total number of chaos jobs executed against all worker nodes |
deleted_pods_total 16 | Total number of deleted pods |
deleted_namespace_pods_count{namespace=myawesomenamespace} | Total number of deleted pods per namespace |
In order to restrict the access to the Kubeinvaders endpoint add this annotation into the ingress.
nginx.ingress.kubernetes.io/whitelist-source-range: <your_ip>/32
Please reach out for news, bugs, feature requests, and other issues via:
- On Twitter: @kubeinvaders & @luckysideburn
- New features are published on YouTube too in this channel
- Kubernetes.io blog: KubeInvaders - Gamified Chaos Engineering Tool for Kubernetes
- acloudguru: cncf-state-of-the-union
- DevNation RedHat Developer: Twitter
- Flant: Open Source solutions for chaos engineering in Kubernetes
- Reeinvent: KubeInvaders - gamified chaos engineering
- Adrian Goins: K8s Chaos Engineering with KubeInvaders
- dbafromthecold: Chaos engineering for SQL Server running on AKS using KubeInvaders
- Pklinker: Gamification of Kubernetes Chaos Testing
- Openshift Commons Briefings: OpenShift Commons Briefing KubeInvaders: Chaos Engineering Tool for Kubernetes
- GitHub: awesome-kubernetes repo
- William Lam: Interesting Kubernetes application demos
- The Chief I/O: 5 Fun Ways to Use Kubernetes
- LuCkySideburn: Talk @ Codemotion
- Chaos Carnival: Chaos Engineering is fun!
- Kubeinvaders (old version) + OpenShift 4 Demo: YouTube_Video
- KubeInvaders (old version) Vs Openshift 4.1: YouTube_Video
- Chaos Engineering for SQL Server | Andrew Pruski | Conf42: Chaos Engineering: YouTube_Video
KubeInvaders is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.