Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I delete heapster and kubernetes-dashboard on gke namespace=kube-system

I want to have full control of what I do with my single node cluster (savings...lol), but somehow I can't do this even if I delete the deployment it respawns ..

like image 924
okandas Avatar asked Sep 16 '17 10:09

okandas


People also ask

How do I delete a namespace in Kubernetes?

To force delete a Kubernetes namespace, remove the finalizer from the namespace's configuration. The finalizer is a Kubernetes resource whose purpose is to prohibit the force removal of an object.

What is Kubernetes dashboard?

The Kubernetes Dashboard is a web-based management interface that enables you to: deploy and edit containerized applications. assess the status of containerized applications. troubleshoot containerized applications.


3 Answers

As mentioned in another answer, you cannot delete them directly via the Kubernetes API; however, you can delete them indirectly via the Google Container Engine API.

To remove the dashboard, run gcloud container clusters update $CLUSTER_NAME --update-addons=KubernetesDashboard=DISABLED.

To disable heapster you need to disable monitoring using gcloud container clusters update $CLUSTER_NAME --monitoring-service=none (it may actually require disabling another add-on too, I can't recall at the moment).

See https://cloud.google.com/sdk/gcloud/reference/container/clusters/update for the commands referenced above.

like image 199
Robert Bailey Avatar answered Oct 10 '22 14:10

Robert Bailey


Heapster is configured as a cluster addon. The addon manager is going to reconcile it to it's preconfigured state if you change or delete it.

You are stuck with it.

like image 45
Janos Lenart Avatar answered Oct 10 '22 15:10

Janos Lenart


Even if you delete heapster pod; it restart automatically. I can made it with scaling it down to zero as shown below

kubectl scale --replicas=0 deployment/heapster-v1.6.0-beta.1 --namespace=kube-system

And you can find the exact name of the heapster pod within result of the command below

kubectl get deployments --namespace=kube-system

By the way you can find more options to reduce resource usage here: https://cloud.google.com/kubernetes-engine/docs/how-to/small-cluster-tuning

like image 1
erdemlal Avatar answered Oct 10 '22 14:10

erdemlal