Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to simulate Power Failure In Kubernetes

I have my rook-cephcluster running on AWS. Its loaded up with data. Is there's any way to stimulate POWER FAILURE so that I can test the behaviour of my cluster?.

like image 816
Rajat Singh Avatar asked Sep 11 '25 13:09

Rajat Singh


1 Answers

From Docker you can send KILL signal "SIGPWR" that Power failure (System V)

docker kill --signal="SIGPWR"

and from Kubernet

kubectl exec <pod> -- /killme.sh

and so scriplt killme.sh

beginning of script-----
#!/bin/bash
# Define process to find
kiperf=$(pidof iperf)
# Kills all iperf or command line
kill -30 $kiperf
script end -------------

signal 30 you can find here

like image 192
Soleil Avatar answered Sep 14 '25 03:09

Soleil