https://github.com/mendrugory/pod-chaos-monkey
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.
https://github.com/mendrugory/pod-chaos-monkey
chaos chaos-engineering chaos-monkey kubernetes
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/mendrugory/pod-chaos-monkey
- Owner: mendrugory
- License: mit
- Created: 2022-09-16T17:17:30.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-17T07:24:18.000Z (almost 4 years ago)
- Last Synced: 2025-06-30T14:08:13.231Z (12 months ago)
- Topics: chaos, chaos-engineering, chaos-monkey, kubernetes
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://www.python.org/) 3.10
The project contains a [Makefile](./Makefile) to make easier the interaction with it.
## Local Python Environment
Create a local environment to develop/test your python code.
```bash
$ make local-environment
```
## Unit test
Run unit tests
```bash
$ make unittest
```
## Create local Kubernetes cluster (KinD)
[Docker](https://www.docker.com/) is mandatory because is a hard requirement of [Kind](https://kind.sigs.k8s.io/).
```bash
$ make kind
```
Once that you have your Kubernetes cluster, you can create some pods:
```bash
$ 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
```bash
$ TAG= make docker-build
```
## Load Image into Kubernetes
Your desired image will be loaded into the kubernetes node.
```bash
$ TAG= make load-image
```
## Install Helm Chart
It will install the [helm chart](./chart/) with the default [values](./chart/values.yaml).
```bash
$ 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:**
```yaml
image: pod-chaos-monkey:latest
schedule: "* * * * *"
namespace: default
```
## Destroy your cluster
```bash
$ make destroy
```