---
id: node-restart
title: Node Restart Experiment Details
sidebar_label: Node Restart
original_id: node-restart
---
---
## Experiment Metadata
| Variables |
Description |
Specify In ChaosEngine |
Notes |
| LIB_IMAGE |
The image used to restart the node |
Optional |
Defaults to `litmuschaos/go-runner:1.11.0` |
| SSH_USER |
name of ssh user |
Mandatory |
Defaults to `root` |
| TARGET_NODE |
name of target node, subjected to chaos |
Mandatory |
|
| TARGET_NODE_IP |
ip of the target node, subjected to chaos |
Mandatory |
|
| REBOOT_COMMAND |
Command used for reboot |
Mandatory |
Defaults to `sudo systemctl reboot` |
| TOTAL_CHAOS_DURATION |
The time duration for chaos insertion (sec) |
Optional |
Defaults to 30s |
| RAMP_TIME |
Period to wait before injection of chaos in sec |
Optional |
|
| LIB |
The chaos lib used to inject the chaos |
Optional |
Defaults to `litmus` supported litmus only |
| LIB_IMAGE |
The image used to restart the node |
Optional |
Defaults to `litmuschaos/go-runner:1.11.0` |
| INSTANCE_ID |
A user-defined string that holds metadata/info about current run/instance of chaos. Ex: 04-05-2020-9-00. This string is appended as suffix in the chaosresult CR name. |
Optional |
Ensure that the overall length of the chaosresult CR is still < 64 characters |
#### Sample ChaosEngine Manifest
[embedmd]: # "https://raw.githubusercontent.com/litmuschaos/chaos-charts/v1.11.x/charts/generic/node-restart/engine.yaml yaml"
```yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: nginx-chaos
namespace: default
spec:
# It can be true/false
annotationCheck: "false"
# It can be active/stop
engineState: "active"
#ex. values: ns1:name=percona,ns2:run=nginx
auxiliaryAppInfo: ""
appinfo:
appns: "default"
applabel: "app=nginx"
appkind: "deployment"
chaosServiceAccount: node-restart-sa
monitoring: false
# It can be delete/retain
jobCleanUpPolicy: "delete"
experiments:
- name: node-restart
spec:
components:
nodeSelector:
# provide the node labels
kubernetes.io/hostname: "node02"
env:
# ENTER THE TARGET NODE NAME
- name: TARGET_NODE
value: "node01"
# ENTER THE TARGET NODE IP
- name: TARGET_NODE_IP
value: ""
# ENTER THE USER TO BE USED FOR SSH AUTH
- name: SSH_USER
value: ""
```
### Create the ChaosEngine Resource
- Create the ChaosEngine manifest prepared in the previous step to trigger the Chaos.
`kubectl apply -f chaosengine.yml`
- If the chaos experiment is not executed, refer to the [troubleshooting](https://docs.litmuschaos.io/docs/faq-troubleshooting/)
section to identify the root cause and fix the issues.
### Watch Chaos progress
- View the status of the nodes as they are subjected to node restart.
`watch -n 1 kubectl get nodes`
### Check Chaos Experiment Result
- Check whether the application is resilient to the node restart, once the experiment (job) is completed. The ChaosResult resource name is derived like this: `