-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhl-delete.sh
50 lines (38 loc) · 1.15 KB
/
hl-delete.sh
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
# Kubernetes Delete Script to delete a Hyperledger Fabric
# Date : 28-10-2016
# Version 0.2
# Author : James Buckett ([email protected])
# Commissioned by ANZ Bank under direction of Ben Smillie ([email protected])
#!/bin/bash -x
clear
export CONTEXT=$(kubectl config view | awk '/current-context/ {print $2}')
kubectl config set-context $CONTEXT --namespace=hyperledger-06
echo "Deleting Validating Peer - vp3"
kubectl delete -f dep-hl-vp3.yml
echo "Deleting Validating Peer - vp2"
kubectl delete -f dep-hl-vp2.yml
echo "Deleting Validating Peer - vp1"
kubectl delete -f dep-hl-vp1.yml
echo "Deleting Validating Peer - vp0"
kubectl delete -f dep-hl-vp0.yml
echo "Deleting Services"
kubectl delete -f svc-hl-vp0.yml
sleep 5
kubectl delete -f svc-hl-vp1.yml
sleep 5
kubectl delete -f svc-hl-vp2.yml
sleep 5
kubectl delete -f svc-hl-vp3.yml
sleep 5
kubectl delete -f svc-hl-vp-lb.yml
sleep 5
echo "Deleting the core-vm-endpoint Service"
kubectl delete -f ep-hl-core.yml
sleep 5
kubectl delete -f svc-hl-core.yml
echo "Deleting the hyperleger namespace"
kubectl delete -f ns-hl.yml
kubectl get services
kubectl get pods
kubectl get replicasets
echo "Done"