Skip to content

Commit e717ca5

Browse files
committed
improve podtato head tutorial
1 parent d0e25e3 commit e717ca5

File tree

2 files changed

+29
-28
lines changed

2 files changed

+29
-28
lines changed
Loading
+29-28
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
22
id: podtato-head
3-
title: Let's Start with Podtato-head
4-
sidebar_label: Let's Start with Podtato-head
5-
---
6-
3+
title: Injecting a pod-delete fault into a Pod
4+
sidebar_label: Injecting a pod-delete fault into a Pod
75
---
86

97
![podtato-head](../assets/tutorials/podtato-head/podtato-head.png)
108

11-
In this tutorial, you will inject a pod-delete fault into the `podtato-head-hat` pod of the sample microservices application, [podtato-head](https://github.com/cncf/podtato-head), and check if the pod remains available during the chaos.
9+
A pod-delete fault is a fault injection experiment that intentionally deletes Kubernetes pods to test the resilience and self-healing capabilities of the system. In this tutorial, you will inject a pod-delete fault into the `podtato-head-hat` pod of the sample microservices application, [podtato-head](https://github.com/cncf/podtato-head), and check if the pod remains available during the chaos.
1210

1311
## What is Podtato-head?
1412

@@ -18,61 +16,61 @@ In this tutorial, you will inject a pod-delete fault into the `podtato-head-hat`
1816

1917
- Kubernetes 1.18 or later (minimum 2 vCPUs, 8GB RAM, 10GB disk space)
2018
- A Persistent volume of 20GB
21-
- [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
19+
- [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) installed on your system
20+
- ChaosCenter installed on your system. You can follow the [Getting Started](../getting-started/installation.md) guide to install it.
2221

23-
## Install Podtato-head
22+
## Step 1: Install Podtato-head
2423

25-
1. Install `podtato-head` in the `podtato-kubectl` namespace using the manifest file, which also creates the namespace
24+
1. Run the command below to create a `podtato-kubectl` namespace and install `podtato-head` in it using the manifest file:
2625

2726
```bash
28-
kubectl apply -f https://github.com/podtato-head/podtato-head-app/releases/download/v0.3.3/manifest.yaml
27+
kubectl apply -f https://github.com/podtato-head/podtato-head-app/releases/download/v0.3.3/manifest.yaml
2928
```
3029

31-
2. Add a label to the `podtato-head-hat` deployment
30+
2. Run the command below to label the `podtato-head-hat` deployment in the `podtato-kubectl` namespace:
3231

3332
```bash
3433
kubectl label deployment podtato-head-hat app=podtato-head-hat -n podtato-kubectl
3534
```
3635

37-
## Install ChaosCenter
38-
39-
1. Follow the [Getting-started](../getting-started/installation.md) guide to install ChaosCenter
36+
Adding a label allows you to specifically target the pod during a Chaos experiment.
4037

41-
2. Access the ChaosCenter Dashboard
38+
## Step 2: Set up Environment
4239

43-
![chaoscenter-dashboard](../assets/tutorials/podtato-head/chaoscenter-dashboard.png)
40+
1. On your ChaosCenter dashboard, navigate to "**Environments**" and create a new environment with the following details:
4441

45-
## Set up Environment
46-
47-
1. Add a new environment
4842
- Environment Name: `local`
4943
- Environment Type: `Production`
5044

51-
![local-environment](../assets/tutorials/podtato-head/local-environment.png)
45+
![chaos center create new environment page](../assets/tutorials/podtato-head/litmus-chaos-create-new-environment-page.png)
46+
47+
## Step 3: Enable Chaos Infrastructure in your Environment
5248

53-
## Enable Chaos Infrastructure
49+
1. Configure a new chaos infrastructure with the following details:
5450

55-
1. Configure a new chaos infrastructure
5651
- Name: `local`
5752
- Chaos Components Installation: `Cluster-wide access`
5853
- Installation Location (Namespace): `litmus`
5954
- Service Account Name: `litmus`
6055

61-
2. Deploy the new chaos infrastructure
56+
2. Deploy the new chaos infrastructure by running:
6257

6358
```bash
6459
kubectl apply -f local-litmus-chaos-enable.yml
6560
```
6661

67-
3. Wait until the status changes to `CONNECTED`.
62+
3. Wait until the status changes to `CONNECTED`
6863

69-
![connected](../assets/tutorials/podtato-head/connected.png)
64+
![local environment showing connected status](../assets/tutorials/podtato-head/connected.png)
7065

71-
## Set up Resilience Probe
66+
## Step 4: Set up Resilience Probe
67+
68+
You need to set up a resilience probe to automatically verify whether the pod remains operational after a fault is injected. For this tutorial, you will use a command-based probe because it allows you to run a specific shell command that checks the status of the target resource (in this case, ensuring the podtato-head-hat pod is running).
7269

7370
1. Select **CMD Probe** as the probe type
7471

75-
2. Configure the probe properties and details
72+
2. Configure the probe properties and details with the following:
73+
7674
- Name: `check-podtato-head-hat-pod`
7775
- Timeout: `10s`
7876
- Interval: `1s`
@@ -84,9 +82,10 @@ kubectl apply -f local-litmus-chaos-enable.yml
8482

8583
![setup-probe](../assets/tutorials/podtato-head/setup-probe.png)
8684

87-
## Run Chaos Experiment
85+
## Step 5: Run Chaos Experiment
8886

8987
1. Start a new chaos experiment
88+
9089
- Name: `podtato-head`
9190
- Chaos Infrastructure: `local`
9291
- Builder Type: `Blank Canvas`
@@ -98,13 +97,15 @@ kubectl apply -f local-litmus-chaos-enable.yml
9897
![add-pod-delete](../assets/tutorials/podtato-head/add-pod-delete.png)
9998

10099
3. Select the target application for the `pod-delete` chaos fault
100+
101101
- App Kind: `deployment`
102102
- App Namespace: `podtato-kubectl`
103103
- App Label: `app=podtato-head-hat`
104104

105105
![select-target-application](../assets/tutorials/podtato-head/select-target-application.png)
106106

107107
4. Add the probe to the `pod-delete` chaos fault
108+
108109
- Probe Name: `check-podtato-head-hat-pod`
109110
- Mode: `EOT`
110111

@@ -123,4 +124,4 @@ kubectl apply -f local-litmus-chaos-enable.yml
123124
---
124125

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

0 commit comments

Comments
 (0)