Dolphin
Dolphin

Reputation: 38607

how to uninstall component using helm in kuberetes

I am install promethus-operator using helm v3.2.1 like this:

./helm install stable/prometheus-operator --generate-name -n dabai-pro

now I want to move the component prometheus-operator from dabai-pro namespace to monitoring namespace and want to delete this installing, I read the docs and doing like this:

[miao@MeowK8SMaster1 linux-amd64]$ ./helm uninstall stable/prometheus-operator -n dabai-pro
Error: uninstall: Release name is invalid: stable/prometheus-operator

and like this :

[miaoyou@MeowK8SMaster1 linux-amd64]$ ./helm uninstall prometheus-operator -n dabai-pro
Error: uninstall: Release not loaded: prometheus-operator: release: not found

so what should I do to remove it?

[miao@MeowK8SMaster1 linux-amd64]$ ./helm list -n dabai-pro
NAME                    NAMESPACE   REVISION    UPDATED                                 STATUS      CHART               APP VERSION
prometheus-1591246262   dabai-pro   1           2020-06-04 12:51:03.763613003 +0800 CST deployed    prometheus-11.3.0   2.18.1
redis-ha-1591192248     dabai-pro   1           2020-06-03 21:50:50.316917158 +0800 CST deployed    redis-ha-4.4.4      5.0.6
[miao@MeowK8SMaster1 linux-amd64]$ ./helm uninstall prometheus-1591246262
Error: uninstall: Release not loaded: prometheus-1591246262: release: not found
[miao@MeowK8SMaster1 linux-amd64]$ ./helm uninstall prometheus-11.3.0
Error: uninstall: Release not loaded: prometheus-11.3.0: release: not found

Upvotes: 2

Views: 12261

Answers (2)

Ray Hallquist
Ray Hallquist

Reputation: 95

What happens when you run?

helm list --all-namespaces

It should list your helm deployment. The --generate-name parameter generated a random name. When you run the uninstall command, both the namespace and the generated name need to be supplied as specified in the earlier answer.

./helm uninstall prometheus-1591246262 -n dabai-pro

Upvotes: 1

Arghya Sadhu
Arghya Sadhu

Reputation: 44559

Use below command to view the release name and namespacename

helm list 

And uninstall the release by

helm uninstall releasename -n namespacename

In your case it will be

./helm uninstall prometheus-1591246262 -n dabai-pro

Upvotes: 7

Related Questions