5

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Nitesh
  • 1,067
  • 1
  • 10
  • 19
  • Please do share the yaml or something that you gave to start the deployment – Gokul C Feb 13 '19 at 06:55
  • I enabled the dashboard by "minikube dashboard --url". Didn't use any external yaml file. – Nitesh Feb 13 '19 at 06:58
  • It is a possibility that the dashboard is static deployment in minikube, and it's file should be present in `/etc/kubernetes/manifests`. If it is present there, by removing that file it will automatically delete it. I am not sure that it is static deployment in minikube or not. Please check – Prafull Ladha Feb 13 '19 at 07:12
  • @PrafullLadha Actually, It's not present in the menifests directory. – Nitesh Feb 13 '19 at 08:08

3 Answers3

7

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
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Nitesh
  • 1,067
  • 1
  • 10
  • 19
2

Try the below command:

kubectl delete -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc5/aio/deploy/recommended.yaml

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
ElasticCode
  • 7,311
  • 2
  • 34
  • 45
1

Please do try the following:

kubectl get secret,sa,role,rolebinding,services,deployments --namespace=kube-system | grep dashboard
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Gokul C
  • 151
  • 14
  • Tried already. It displays secret, service, and deployment. I deleted all of these. It didn't work. – Nitesh Feb 13 '19 at 07:04