I can not remove kubernetes-dashboard from Minikube. I tried deleting the deployment "deployment.apps/kubernetes-dashboard" multiple times. But it gets recreated automatically in a few seconds.
I am using the following command to delete the deployment:
kubectl delete deployment.apps/kubernetes-dashboard -n kube-system
I even tried to edit the deployment by setting the replica count to zero. But even it gets reset automatically after a few seconds.
The same thing happens for nginx-ingress deployment in kube-system.
I had to disable the dashboard addon using minikube first. Then deleting the deployment did work for me.
minikube addons disable dashboard
And in case of ingress:
minikube addons disable ingress
Try the below command:
kubectl delete -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc5/aio/deploy/recommended.yaml
Please do try the following:
kubectl get secret,sa,role,rolebinding,services,deployments --namespace=kube-system | grep dashboard