Skip to content

Pod chaos monkey is a PoC of a chaos engineering for Kubernetes which will help us to test the reliability of our system. It will killed pod, in a desired namespace in a schedule.

License

Notifications You must be signed in to change notification settings

mendrugory/pod-chaos-monkey

Repository files navigation

Pod Chaos Monkey

Pod chaos monkey is a PoC of chaos engineering for Kubernetes which will help us to test the reliability of our system. It will kill pods (once at a time), in a desired namespace, in a schedule.

This PoC has been developed using Python 3.10

The project contains a Makefile to make easier the interaction with it.

Local Python Environment

Create a local environment to develop/test your python code.

$ make local-environment

Unit test

Run unit tests

$ make unittest

Create local Kubernetes cluster (KinD)

Docker is mandatory because is a hard requirement of Kind.

$ make kind

Once that you have your Kubernetes cluster, you can create some pods:

$ kubectl run nginx1 --image=nginx

Environment Variables

  • ENVIRONMENT: Environment where the software will be running (KUBERNETES, LOCAL). By default: KUBERNETES.
  • LOGGER_LEVEL: Level for the logger. By default: INFO

Build Docker image

$ TAG=<desired tag> make docker-build

Load Image into Kubernetes

Your desired image will be loaded into the kubernetes node.

$ TAG=<desired tag> make load-image

Install Helm Chart

It will install the helm chart with the default values.

$ make helm-install

Helm chart values file contains the docker image, cron value and namespace where the pods will be removed. You can apply your own values.

example:

image: pod-chaos-monkey:latest
schedule: "* * * * *"
namespace: default

Destroy your cluster

$ make destroy

About

Pod chaos monkey is a PoC of a chaos engineering for Kubernetes which will help us to test the reliability of our system. It will killed pod, in a desired namespace in a schedule.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages