All Projects → lucky-sideburn → Kubeinvaders

lucky-sideburn / Kubeinvaders

Licence: apache-2.0
Gamified Chaos Engineering Tool for Kubernetes

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Kubeinvaders

Chaoskube
chaoskube periodically kills random pods in your Kubernetes cluster.
Stars: ✭ 1,325 (+96.88%)
Mutual labels:  chaos-engineering, chaos
Chaosengineeringbootcamp
A Chaos Engineering Bootcamp
Stars: ✭ 164 (-75.63%)
Mutual labels:  chaos-engineering, chaos
Comcast
Simulating shitty network connections so you can build better systems.
Stars: ✭ 7,703 (+1044.58%)
Mutual labels:  chaos-engineering, chaos
Muxy
Chaos engineering tool for simulating real-world distributed system failures
Stars: ✭ 756 (+12.33%)
Mutual labels:  chaos-engineering, chaos
kraken
Chaos and resiliency testing tool for Kubernetes and OpenShift
Stars: ✭ 161 (-76.08%)
Mutual labels:  openshift, chaos-engineering
Chaos Ssm Documents
Collection of AWS SSM Documents to perform Chaos Engineering experiments
Stars: ✭ 225 (-66.57%)
Mutual labels:  chaos-engineering, chaos
Pumba
Chaos testing, network emulation, and stress testing tool for containers
Stars: ✭ 2,136 (+217.38%)
Mutual labels:  chaos-engineering, chaos
Chaos Mesh
A Chaos Engineering Platform for Kubernetes.
Stars: ✭ 4,265 (+533.73%)
Mutual labels:  chaos-engineering, chaos
Performance-Engineers-DevOps
This repository helps performance testers and engineers who wants to dive into DevOps and SRE world.
Stars: ✭ 35 (-94.8%)
Mutual labels:  chaos, chaos-engineering
awesome-chaos-engineering
Awesome chaos engineering page
Stars: ✭ 18 (-97.33%)
Mutual labels:  chaos, chaos-engineering
xk6-chaos
xk6 extension for running chaos experiments with k6 💣
Stars: ✭ 18 (-97.33%)
Mutual labels:  chaos, chaos-engineering
Awesome Chaos Engineering
A curated list of Chaos Engineering resources.
Stars: ✭ 4,740 (+604.31%)
Mutual labels:  chaos-engineering, chaos
Tetris game
A Tetris Game with AI
Stars: ✭ 600 (-10.85%)
Mutual labels:  game
Chaos Monkey Spring Boot
Chaos Monkey for Spring Boot
Stars: ✭ 646 (-4.01%)
Mutual labels:  chaos-engineering
Toxiproxy
⏰ 🔥 A TCP proxy to simulate network and system conditions for chaos and resiliency testing
Stars: ✭ 7,529 (+1018.72%)
Mutual labels:  chaos
Mdk Se
Malware's Development Kit for SE
Stars: ✭ 597 (-11.29%)
Mutual labels:  game
Gameproject3
游戏服务器框架,网络层分别用SocketAPI、Boost Asio、Libuv三种方式实现, 框架内使用共享内存,无锁队列,对象池,内存池来提高服务器性能。还包含一个不断完善的Unity 3D客户端,客户端含大量完整资源,坐骑,宠物,伙伴,装备, 这些均己实现上阵和穿戴, 并可进入副本战斗,多人玩法也己实现, 持续开发中。
Stars: ✭ 655 (-2.67%)
Mutual labels:  game
Betago
BetaGo: AlphaGo for the masses, live on GitHub.
Stars: ✭ 639 (-5.05%)
Mutual labels:  game
Unvanquished
An FPS/RTS hybrid game powered by the Daemon engine (a combination of ioq3 and XreaL)
Stars: ✭ 595 (-11.59%)
Mutual labels:  game
Gameplane
基于Android的仿微信打飞机游戏
Stars: ✭ 592 (-12.04%)
Mutual labels:  game

Alt Text

Gamified chaos engineering and analysis 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 (game part in pure JS)
  3. Special Input Keys and features
  4. Prometheus metrics and Grafana
  5. Installation
  6. Notes for large clusters
  7. Configuration

Description

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

New Version

KubeInvaders is going to be full open-source. Meanwhile it is possibile choose between 2 different versions.

  • Legacy version: Made using Defold as game engine.
  • New version: It has been written in pure Javascript and it is totally open-source.

The new version of KubeInvaders has fewer features than legacy but is optimized for chaos engineering because pods and nodes are rendered together and there is a shuffle functionality for better random experiments.

Special Input Keys and features

Input Action Version (New or Legacy)
n Change namespace (you should define namespaces list. Ex: TARGET_NAMESPACE=foo1,foo2,foo3). New, Legacy
a Switch to automatic mode. Legacy
m Switch to manual mode. Legacy
h Show special keys. New, Legacy
q Hide help for special keys. New, Legacy
i Show pod's name. Move the ship towards an alien. Legacy
r Refresh log of a pod when spaceship is over the alien. Legacy
s Activate or deactivate shuffle New
k (NEW) Perform kube-linter analysis for a pod. Legacy
w (NEW) Chaos engineering against Kubernetes nodes. New, 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.

Metrics

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

Download Grafana dashboard

Alt Text

Alt Text

Installation

Install to Kubernetes with Helm (v3+)

# Set target_namespace and ingress.hostname!
git clone https://github.com/lucky-sideburn/KubeInvaders.git

kubectl create namespace kubeinvaders

# Install new and full open-source version
helm install kubeinvaders --set-string target_namespace="namespace1\,namespace2" \
--namespace kubeinvaders ./helm-charts/kubeinvaders \
--set ingress.hostName=kubeinvaders.io --set image.tag=v1.0

# Install legacy version
helm install kubeinvaders --set-string target_namespace="namespace1\,namespace2" \
--namespace kubeinvaders ./helm-charts/kubeinvaders \
--set ingress.hostName=kubeinvaders.io --set image.tag=legacy

Security Notes

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

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

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

# Choose route host for your kubeinvaders instance.
ROUTE_HOST=kubeinvaders.org

# Please add your source ip IP_WHITELIST. This will add haproxy.router.openshift.io/ip_whitelist in KubeInvaders route
# https://docs.openshift.com/container-platform/3.9/architecture/networking/routes.html#whitelist
IP_WHITELIST="93.44.96.4"

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 --field-selector=type==kubernetes.io/service-account-token | grep 'kubeinvaders-token' | awk '{ print $1}' | head -n 1)

oc process -f openshift/KubeInvaders.yaml -p ROUTE_HOST=$ROUTE_HOST -p TARGET_NAMESPACE=$TARGET_NAMESPACE -p KUBEINVADERS_SECRET=$KUBEINVADERS_SECRET | oc create -f -

Notes for large clusters

For clusters with many workers-nodes, KubeInvaders (legacy version) selects a subset of random items.

Item Max Number
Nodes 15

Configuration

(Legacy Version) Environment Variables - Make the game more difficult to win!

Set the following variables in Kubernetes Deployment or OpenShift DeploymentConfig:

ENV Var Description
ALIENPROXIMITY (default 15) Reduce the value to increase distance between aliens.
HITSLIMIT (default 0) Seconds of CPU time to wait before shooting.
UPDATETIME (default 1) Seconds to wait before update PODs status (you can set also 0.x Es: 0.5).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].