Awesome Open Source
Awesome Open Source

Gamified chaos engineering tool for Kubernetes. It is like Space Invaders but the aliens are pods or worker nodes.

Alt Text

Table of Contents

  1. Description
  2. New Version
  3. Special Input Keys and features
  4. Prometheus metrics and Grafana
  5. Installation
  6. Notes for large clusters
  7. Configuration


Through KubeInvaders you can stress a Kubernetes cluster in a fun way and check how it is resilient.

New Version

KubeInvaders is now fully open-source. However, it is still possibile to use the legacy version made with Defold.


Install to Kubernetes with Helm (v3+)

Artifact HUB

helm repo add kubeinvaders

kubectl create namespace kubeinvaders

helm install kubeinvaders --set-string target_namespace="namespace1\,namespace2" \
-n kubeinvaders kubeinvaders/kubeinvaders --set --set image.tag=v1.4

Install legacy version

helm install kubeinvaders --set-string target_namespace="namespace1\,namespace2" \
-n kubeinvaders kubeinvaders/kubeinvaders --set --set image.tag=legacy

Known problems

  • It seems that KubeInvaders does not work with EKS because of problems with ServiceAccount. Work in progress!

Hands-on Tutorial

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

- job_name: kubeinvaders
  - 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

Download Grafana dashboard

Alt Text

Alt Text

Security Notes

In order to restrict the access to the Kubeinvaders endpoint add this annotation into the ingress. <your_ip>/32

Install KubeInvaders on OpenShift

To Install KubeInvaders on your OpenShift Cluster clone this repo and launch the following commands:

oc create clusterrole kubeinvaders-role --verb=watch,get,delete,list --resource=pods,pods/log,jobs

## You can define multiple namespaces ex: TARGET_NAMESPACE=foobar,foobar2

# Choose route host for your kubeinvaders instance.

# Please add your source ip IP_WHITELIST. This will add in KubeInvaders route

oc new-project kubeinvaders --display-name='KubeInvaders'
oc create sa kubeinvaders -n kubeinvaders
oc adm policy add-cluster-role-to-user kubeinvaders-role -z kubeinvaders -n kubeinvaders

KUBEINVADERS_SECRET=$(oc get secret -n kubeinvaders | grep 'kubeinvaders-token' | awk '{ print $1}' | head -n 1)


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (70,303
kubernetes (1,767
game (1,043
openshift (102
chaos-engineering (29
chaos (27