forked from kadalu/kadalu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleanup
executable file
·31 lines (25 loc) · 1.33 KB
/
cleanup
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
#!/bin/bash
kubectl -nkadalu delete StatefulSet kadalu-csi-provisioner
kubectl -nkadalu delete ClusterRoleBinding kadalu-csi-provisioner
kubectl -nkadalu delete ServiceAccount kadalu-csi-provisioner
kubectl -nkadalu delete ClusterRole kadalu-csi-provisioner
kubectl -nkadalu delete Role kadalu-csi-provisioner
kubectl -nkadalu delete RoleBinding kadalu-csi-provisioner
kubectl -nkadalu delete DaemonSet kadalu-csi-nodeplugin
kubectl -nkadalu delete ClusterRoleBinding kadalu-csi-nodeplugin
kubectl -nkadalu delete ClusterRole kadalu-csi-nodeplugin
kubectl -nkadalu delete ServiceAccount kadalu-csi-nodeplugin
kubectl delete CSIDriver kadalu
kubectl get Service -nkadalu | awk '{print $1}' | xargs kubectl -nkadalu delete Service
kubectl get StatefulSet -nkadalu | awk '{print $1}' | xargs kubectl -nkadalu delete StatefulSet
kubectl get storageclass | grep kadalu | awk '{print $1}' | xargs kubectl delete storageclass
# Operator
kubectl delete -nkadalu CustomResourceDefinition kadalustorages.kadalu-operator.storage
kubectl delete -nkadalu ClusterRole pod-exec
kubectl delete -nkadalu ClusterRole kadalu-operator
kubectl delete -nkadalu ServiceAccount kadalu-operator
kubectl delete -nkadalu ClusterRoleBinding kadalu-operator
kubectl delete -nkadalu Deployment kadalu-operator
# CSIDriver
kubectl delete CSIDriver kadalu
kubectl delete namespace kadalu