当前位置: 首页 > 软件库 > 云计算 > 云原生 >

kubedoom

Kill Kubernetes pods by playing Id's DOOM!
授权协议 GPL-3.0 License
开发语言 Google Go
所属分类 云计算、 云原生
软件类型 开源软件
地区 不详
投 递 者 濮升
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Kube DOOM

Kill Kubernetes pods using Id's Doom!

The next level of chaos engineering is here! Kill pods inside your Kubernetescluster by shooting them in Doom!

This is a fork of the excellentgideonred/dockerdoomd using aslightly modified Doom, forked from https://github.com/gideonred/dockerdoom,which was forked from psdoom.

Running Locally

In order to run locally you will need to

  1. Run the kubedoom container
  2. Attach a VNC client to the appropriate port (5901)

With Docker

Run storaxdev/kubedoom:0.5.0 with docker locally:

$ docker run -p5901:5900 \
  --net=host \
  -v ~/.kube:/root/.kube \
  --rm -it --name kubedoom \
  storaxdev/kubedoom:0.5.0

Optionally, if you set -e NAMESPACE={your namespace} you can limit Kubedoom to deleting pods in a single namespace

With Podman

Run storaxdev/kubedoom:0.5.0 with podman locally:

$ podman run -it -p5901:5900/tcp \
  -v ~/.kube:/tmp/.kube --security-opt label=disable \
  --env "KUBECONFIG=/tmp/.kube/config" --name kubedoom
  storaxdev/kubedoom:0.5.0

Attaching a VNC Client

Now start a VNC viewer and connect to localhost:5901. The password is idbehold:

$ vncviewer viewer localhost:5901

You should now see DOOM! Now if you want to get the job done quickly enter thecheat idspispopd and walk through the wall on your right. You should begreeted by your pods as little pink monsters. Press CTRL to fire. If thepistol is not your thing, cheat with idkfa and press 5 for a nice surprise.Pause the game with ESC.

Killing namespaces

Kubedoom now also supports killing namespaces in case you have too many ofthem. Simply set the -mode flagto namespaces:

$ docker run -p5901:5900 \
  --net=host \
  -v ~/.kube:/root/.kube \
  --rm -it --name kubedoom \
  storaxdev/kubedoom:0.5.0 \
  -mode namespaces

Running Kubedoom inside Kubernetes

See the example in the /manifest directory. You can quickly test it usingkind. Create a cluster with theexample config from this repository:

$ kind create cluster --config kind-config.yaml
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.19.1) ��
 ✓ Preparing nodes �� ��
 ✓ Writing configuration ��
 ✓ Starting control-plane ��️
 ✓ Installing CNI ��
 ✓ Installing StorageClass ��
 ✓ Joining worker nodes ��
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Not sure what to do next? ��  Check out https://kind.sigs.k8s.io/docs/user/quick-start/

This will spin up a 2 node cluster inside docker, with port 5900 exposed fromthe worker node. Then run kubedoom inside the cluster by applying the manifestprovided in this repository:

$ kubectl apply -k manifest/
namespace/kubedoom created
deployment.apps/kubedoom created
serviceaccount/kubedoom created
clusterrolebinding.rbac.authorization.k8s.io/kubedoom created

To connect run:

$ vncviewer viewer localhost:5900

Kubedoom requires a service account with permissions to list all pods and deletethem and uses kubectl 1.19.2.