How can I delete the Kubernetes dashboard from kube-system?

2/13/2019

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.

-- Nitesh
kubernetes
kubernetes-dashboard
kubernetes-ingress
minikube

3 Answers

2/13/2019

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
-- Nitesh
Source: StackOverflow

2/17/2020

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

-- ElasticCode
Source: StackOverflow

2/13/2019

Please do try the following:

kubectl get secret,sa,role,rolebinding,services,deployments --namespace=kube-system | grep dashboard
-- Gokul C
Source: StackOverflow