#!/bin/bash

# uninstall nginx ingress and expose tidb dashboard
/usr/local/bin/kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.0/deploy/static/provider/aws/deploy.yaml --kubeconfig="/home/centos/.kube/config"
/usr/local/bin/kubectl delete -f /home/centos/tioperator/files_k8s/tidb-dashboard.yaml.template -n tidb-cluster --kubeconfig="/home/centos/.kube/config"

# uninstall tidb
/usr/local/bin/kubectl delete -f /home/centos/tioperator/files_k8s/tidb-cluster.yaml.template -n tidb-cluster --kubeconfig="/home/centos/.kube/config" 
/usr/local/bin/kubectl delete -f /home/centos/tioperator/files_k8s/tidb-monitor.yaml.template -n tidb-cluster --kubeconfig="/home/centos/.kube/config"
