当前位置:网站首页>[chaosblade: node disk filling, killing the specified process on the node, suspending the specified process on the node]
[chaosblade: node disk filling, killing the specified process on the node, suspending the specified process on the node]
2022-07-07 08:59:00 【Fairy Xiao Xiaole】
Node disk fill scenario
The goal is : Specify node disk occupancy 80%
Select a node , modify fill_node_disk_by_names.yaml Medium names value .
ill_node_disk_by_names.yaml Content :
apiVersion: chaosblade.io/v1alpha1
kind: ChaosBlade
metadata:
name: fill-node-disk-by-names
spec:
experiments:
- scope: node
target: disk
action: fill
desc: "node disk fill"
matchers:
- name: names
value: ["docker20"]
- name: percent
value: ["80"]
Carry out orders , Start the experiment :
$ kubectl apply -f fill_node_disk_by_names.yaml
Check the experiment status
perform kubectl get blade fill-node-disk-by-names -o json command , Check the experiment status .
View experiment results
You can see that the disk is occupied 80%.
# Enter the experiment node
$ ssh [email protected]
# Check disk usage
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.9G 0 7.9G 0% /dev
tmpfs 1.6G 2.2M 1.6G 1% /run
/dev/sda2 98G 73G 20G 79% /
tmpfs 7.9G 0 7.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/loop1 90M 90M 0 100% /snap/core/8268
tmpfs 1.6G 0 1.6G 0% /run/user/1000
/dev/loop0 98M 98M 0 100% /snap/core/9289
Stop the experiment
Carry out orders :kubectl delete -f fill_node_disk_by_names.yaml
Or delete blade resources :kubectl delete blade fill-node-disk-by-names
Node process related scenarios
The goal is : This experiment will delete redis-server process .
Select a node , modify kill_node_process_by_names.yaml Medium names value .
kill_node_process_by_names.yaml Content :
apiVersion: chaosblade.io/v1alpha1
kind: ChaosBlade
metadata:
name: kill-node-process-by-names
spec:
experiments:
- scope: node
target: process
action: kill
desc: "kill node process by names"
matchers:
- name: names
value: ["docker20"]
- name: process
value: ["redis-server"]
Carry out orders , Start the experiment :
$ kubectl apply -f kill_node_process_by_names.yaml
Check the experiment status
perform kubectl get blade kill-node-process-by-names -o json command , Check the experiment status .
View experiment results
# Enter the experiment node
$ ssh [email protected]
# see redis-server Process number
$ ps -ef | grep redis-server
root 31327 31326 0 06:15 ? 00:00:00 redis-server *:6379
# You can see that the process number has changed
$ ps -ef | grep redis-server
root 2873 2872 0 06:23 ? 00:00:00 redis-server *:6379
redis-server The process number of has changed , It means that after being killed , Pulled up again .
Stop the experiment
Carry out orders :kubectl delete -f kill_node_process_by_names.yaml
Or delete blade resources :kubectl delete blade kill-node-process-by-names
Suspend the specified process on the node
The goal is : This experiment will suspend redis-server process .
Select a node , modify stop_node_process_by_names.yaml Medium names value .
stop_node_process_by_names.yaml Content :
apiVersion: chaosblade.io/v1alpha1
kind: ChaosBlade
metadata:
name: stop-node-process-by-names
spec:
experiments:
- scope: node
target: process
action: stop
desc: "kill node process by names"
matchers:
- name: names
value: ["docker20"]
- name: process
value: ["redis-server"]
Carry out orders , Start the experiment :
$ kubectl apply -f stop_node_process_by_names.yaml
Check the experiment status
perform kubectl get blade stop-node-process-by-names -o json command , Check the experiment status .
View experiment results
# Enter the experiment node
$ ssh [email protected]
# see redis-server Process number
$ ps aux| grep redis-server
root 5632 0.0 0.0 41520 4168 ? Tl 06:28 0:06 redis-server *:6379
You can see redis-server At this moment, the process is suspended (T).
Stop the experiment
Carry out orders :kubectl delete -f stop_node_process_by_names.yaml
Or delete blade resources :kubectl delete blade stop-node-process-by-names
边栏推荐
- Sign and authenticate API interface or H5 interface
- Tronapi wave field interface - source code without encryption - can be opened twice - interface document attached - package based on thinkphp5 - detailed guidance of the author - July 6, 2022 - Novice
- Synchronized underlying principle, volatile keyword analysis
- 【ChaosBlade:根据标签删除POD、Pod 域名访问异常场景、Pod 文件系统 I/O 故障场景】
- 年薪50w阿裏P8親自下場,教你如何從測試進階
- Mock. JS usage details
- 模拟卷Leetcode【普通】1705. 吃苹果的最大数目
- C语言指针(下篇)
- Several common database connection methods
- LeetCode 715. Range module
猜你喜欢
2022-06-30 unity core 8 - model import
Screen automatically generates database documents
Greenplum 6.x build_ Environment configuration
UnityShader入门精要个人总结--基础篇(一)
【Istio Network CRD VirtualService、Envoyfilter】
最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
Troublesome problem of image resizing when using typora to edit markdown to upload CSDN
The longest ascending subsequence model acwing 1017 Strange thief Kidd's glider
Why choose cloud native database
MySQL master-slave delay solution
随机推荐
Unity shader beginner's Essentials (I) -- basic lighting notes
端口复用和重映像
channel. Detailed explanation of queuedeclare parameters
Uniapp wechat applet monitoring network
ESP32-ULP协处理器低功耗模式RTC GPIO中断唤醒
测试人一定要会的技能:selenium的三种等待方式解读,清晰明了
Count the number of words C language
硬件大熊原创合集(2022/06更新)
A bug using module project in idea
为不同类型设备构建应用的三大更新 | 2022 I/O 重点回顾
How to add a mask of a target in a picture
Interpretation of MySQL optimization principle
LED模拟与数字调光
徽商期货公司评级是多少?开户安全吗?我想开户,可以吗?
Routing information protocol rip
平台化,强链补链的一个支点
硬核分享:硬件工程师常用工具包
Redis fault handling "can't save in background: fork: cannot allocate memory“
Data analysis methodology and previous experience summary 2 [notes dry goods]
NCS Chengdu Xindian interview experience