Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete(uninstall) helm chart on specific resource

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
like image 415
joe Avatar asked Mar 07 '19 05:03

joe


2 Answers

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
like image 164
Rico Avatar answered Oct 24 '22 03:10

Rico


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/

like image 40
yogihosting Avatar answered Oct 24 '22 03:10

yogihosting