-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrook-reset.txt
71 lines (69 loc) · 2.16 KB
/
rook-reset.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: disk-wipe-n2
spec:
restartPolicy: Never
nodeName: n2
containers:
- name: disk-wipe
image: busybox
securityContext:
privileged: true
command: ["/bin/sh", "-c", "
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdb;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdc;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdd;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sde;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdf;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdg;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdh;
"]
EOF
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: disk-wipe-n3
spec:
restartPolicy: Never
nodeName: n3
containers:
- name: disk-wipe
image: busybox
securityContext:
privileged: true
command: ["/bin/sh", "-c", "
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdb;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdc;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdd;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sde;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdf;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdg;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdh;
"]
EOF
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: disk-wipe-n4
spec:
restartPolicy: Never
nodeName: n4
containers:
- name: disk-wipe
image: busybox
securityContext:
privileged: true
command: ["/bin/sh", "-c", "
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdb;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdc;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdd;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sde;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdf;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdg;
dd if=/dev/zero bs=1M count=100 oflag=direct of=/dev/sdh;
"]
EOF