-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdestroy.sh
executable file
·29 lines (29 loc) · 1.2 KB
/
destroy.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
cd app/helloworld
#delete demo app
kubectl delete -f ingress.yaml
kubectl delete -f service.yaml
kubectl delete -f deployment.yaml
kubectl delete -f ns.yaml
cd ../../ingress
#delete KIC
kubectl delete -f cis/crd/virtualserver.yaml
kubectl delete -f nginx/service/service.yaml
kubectl delete -f nginx/deployment/nginx-ingress.yaml
kubectl delete -f nginx/common/ingress-class.yaml
kubectl delete -f nginx/common/nginx-config.yaml
kubectl delete -f nginx/common/default-server-secret.yaml
kubectl delete -f nginx/rbac/rbac.yaml
kubectl delete -f nginx/common/ns-and-sa.yaml
kubectl delete -f nginx/common/crds/k8s.nginx.org_virtualservers.yaml
kubectl delete -f nginx/common/crds/k8s.nginx.org_virtualserverroutes.yaml
kubectl delete -f nginx/common/crds/k8s.nginx.org_transportservers.yaml
kubectl delete -f nginx/common/crds/k8s.nginx.org_policies.yaml
#delete CIS
kubectl delete -f cis/cis1.yaml
kubectl delete -f cis/cis2.yaml
kubectl delete -f cis/secret_sa_rbac.yaml
kubectl delete -f cis/crd-definition/customresourcedefinitions.yaml
#destroy infrastructure
cd ../infra
terraform destroy -auto-approve
cd ..