How to delete(uninstall) helm chart on specific resource
Asked Answered
S

3

30

I have installed redis. The default given name to me is plinking-narwhal. Now I would like to install a service with my assigned name. But first I want to remove the existing one. I had tried deleting them without success.

$ kubectl get all
NAME                                               READY     STATUS    RESTARTS   AGE
pod/plinking-narwhal-redis-master-0                1/1       Running   0          12m
pod/plinking-narwhal-redis-slave-9b645b597-2vh82   1/1       Running   7          12m

NAME                                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
service/kubernetes                      ClusterIP   10.96.0.1        <none>        443/TCP    15m
service/plinking-narwhal-redis-master   ClusterIP   10.109.186.189   <none>        6379/TCP   12m
service/plinking-narwhal-redis-slave    ClusterIP   10.99.122.12     <none>        6379/TCP   12m

NAME                                           DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/plinking-narwhal-redis-slave   1         1         1            1           12m

NAME                                                     DESIRED   CURRENT   READY     AGE
replicaset.apps/plinking-narwhal-redis-slave-9b645b597   1         1         1         12m

NAME                                             DESIRED   CURRENT   AGE
statefulset.apps/plinking-narwhal-redis-master   1         1         12m
master $ helm delete stable/redis
Error: invalid release name, must match regex ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$ and the length must not longer than 53
master $ helm delete --name plinking-narwhal stable/redis
Error: unknown flag: --name
Shred answered 7/3, 2019 at 5:7 Comment(0)
P
44

You probably need:

$ helm delete redis

or if you completely want to remove the release:

$ helm delete redis --purge

stable/redis is not allowed as an expression because of the slash(/)

If you'd like to see the name of the releases you can simply run:

$ helm list -aq
Politicking answered 7/3, 2019 at 6:34 Comment(3)
add --purge to the delete command if you want to reuse the release nameFenugreek
Unknown flag purge whatever i'd put itOctaviaoctavian
@Octaviaoctavian since Helm 3, there is no --purge option as purging is now the defaultInstrumentalist
M
20

Helm delete command is renamed to helm uninstall. So you probably have to use:

helm uninstall redis

More info at - https://helm.sh/docs/helm/helm_uninstall/

Menses answered 31/3, 2021 at 16:2 Comment(0)
V
0

helm delete networkpolicy -n namespace_name

release "networkpolicy" uninstalled

Villeneuve answered 22/8, 2023 at 9:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.