https://github.com/ricardoferreirasilva/chaos-mesh-poc
https://github.com/ricardoferreirasilva/chaos-mesh-poc
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ricardoferreirasilva/chaos-mesh-poc
- Owner: ricardoferreirasilva
- Created: 2024-12-03T14:00:03.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-12-03T15:23:41.000Z (11 months ago)
- Last Synced: 2025-04-09T20:15:41.206Z (6 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Description
This repository was created in order to showcase a proof-of-concept implementation of Chaos Mesh with K8s.# Instruction
We will start by creating two namespaces: chaos-mesh to host our chaos mesh related deployables and agent plus a staging environment for running our experiments.``kubectl apply -f ./namespaces``
Next we will install chaos-mesh and verify its installation. You need helm locally for this step.
`helm repo add chaos-mesh https://charts.chaos-mesh.org`
`helm install chaos-mesh chaos-mesh/chaos-mesh -n=chaos-mesh --version 2.7.0`
`kubectl get po -n chaos-mesh`
Next we need to create cluster wide roles for the chaos-mesh agent.
`kubectl apply -f roles`
Switch to the default namespace `kubens default`
generate a token
`kubectl create token account-cluster-manager` and save itThe chaos-mesh dashboard can be accessed by doing a simple port forward.
`kubectl port-forward chaos-dashboard-7c66c9f685-2wkh4 2333:2333` you can past your token on the dashboard.We will now deploy an hello-world app on the staging environment in order to run experiments on it.
`kubectl apply -f ./hello-world`
This app will be available on localhost:30001 due to the NodePort.
We can now use the dashboard or manifest files to create experiments for it. For example:`kubectl apply -f ./experiments/hello-world-pod-failure.yaml` will simulate pod failures for all pods in the staging environment for the next 2 minutes.