Skip to main content
Version: 3.12.0

Let's start with Podtato-head


podtato-head

In this tutorial, you will inject a pod-delete fault into a sample microservices application called podtato-head and verify if the service continues to be available during the chaos duration.

Prerequisites​

  • Kubernetes 1.18 or later (minimum 2 vCPUs, 8GB RAM, 10GB disk space)

  • A Persistent volume of 20GB

  • Helm3 or kubectl

Install ChaosCenter​

  1. Follow the Getting-started to install ChaosCenter

  2. Access to ChaosCenter Dashboard

chaoscenter-dashboard

Set up Environment​

  1. Add a new environment
  • Environment Name: local
  • Environment Type: Production

local-environment

Enable Chaos Infrastructure​

  1. Configure a new chaos infrastructure
  • Name: local
  • Chaos Components Installation: Cluster-wide access
  • Installation Location (Namespace): litmus
  • Service Account Name: litmus
  1. Deploy the new chaos infrastructure
kubectl apply -f local-litmus-chaos-enable.yml
  1. Wait until the status shows CONNECTED.

connected

Set up Resilience Probe​

  1. Select HTTP Probe as the probe type

  2. Configure properties & probe details

  • Name: check-podtato-main-access-probe
  • Timeout: 10s
  • Interval: 1s
  • Attempt: 1
  • URL: http://podtato-main.{{workflow.parameters.adminModeNamespace}}.svc.cluster.local:9000
  • Method: GET
  • Criteria: ==
  • Response Code: 200

setup-probe

Run Chaos Experiment with Podtato-head​

  1. For Kubernetes v1.24 or later, bind a ClusterRole to the argo-chaos service account
kubectl create rolebinding argo-chaos-binding --clusterrole=admin --serviceaccount=litmus:argo-chaos -n litmus
  1. Configure a new chaos experiment
  • Name: podtato-head
  • Chaos Infrastructure: local
  1. Select Podtato-head Chaos template

podtato-head-template

  1. Add the new probe to pod-delete fault
  • Probe Name: check-podtato-main-access-probe
  • Mode: Continuous

add-probe

  1. Remove the old probe section below from podtato-head.yml
probe:
- name: "check-podtato-main-access-url"
type: "httpProbe"
httpProbe/inputs:
url: "http://podtato-main.{{workflow.parameters.adminModeNamespace}}.svc.cluster.local:9000"
insecureSkipVerify: false
method:
get:
criteria: "=="
responseCode: "200"
mode: "Continuous"
runProperties:
probeTimeout: 1s
interval: 100ms
attempt: 1
  1. Save and run the chaos experiment

Check Chaos Experiment Results​

  • Experiment Status: COMPLETED
  • Resilience Score: 100%
  • Probe Result: PASSED

experiment-result


Congratulations! 🎉 You've successfully completed the tutorial.
Continue exploring more tutorials to enjoy your journey with LitmusChaos! 🚀