25

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
Community
  • 1
  • 1
joe
  • 8,383
  • 13
  • 61
  • 109

3 Answers3

40

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
Rico
  • 58,485
  • 12
  • 111
  • 141
15

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/

yogihosting
  • 5,494
  • 8
  • 47
  • 80
0

helm delete networkpolicy -n namespace_name

release "networkpolicy" uninstalled

saurabh raj
  • 470
  • 4
  • 4