2019-12-19 02:02:26 +00:00
|
|
|
---
|
2020-04-07 18:55:19 +00:00
|
|
|
layout: docs
|
2020-09-01 15:14:13 +00:00
|
|
|
page_title: Uninstall
|
|
|
|
sidebar_title: Uninstall
|
|
|
|
description: Uninstall Consul on Kubernetes
|
2019-12-19 02:02:26 +00:00
|
|
|
---
|
|
|
|
|
2020-09-01 15:14:13 +00:00
|
|
|
# Uninstall Consul
|
2020-04-06 20:27:35 +00:00
|
|
|
|
2019-12-19 02:02:26 +00:00
|
|
|
Consul can be uninstalled via the `helm delete` command:
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2019-12-19 02:02:26 +00:00
|
|
|
$ helm delete hashicorp
|
|
|
|
release "hashicorp" uninstalled
|
|
|
|
```
|
|
|
|
|
|
|
|
-> If using Helm 2, run `helm delete --purge hashicorp`
|
|
|
|
|
|
|
|
After deleting the Helm release, you need to delete the `PersistentVolumeClaim`'s
|
|
|
|
for the persistent volumes that store Consul's data. These are not deleted by Helm due to a [bug](https://github.com/helm/helm/issues/5156).
|
|
|
|
To delete, run:
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2019-12-19 02:02:26 +00:00
|
|
|
$ kubectl get pvc -l chart=consul-helm
|
|
|
|
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
|
|
|
|
data-default-hashicorp-consul-server-0 Bound pvc-32cb296b-1213-11ea-b6f0-42010a8001db 10Gi RWO standard 17m
|
|
|
|
data-default-hashicorp-consul-server-1 Bound pvc-32d79919-1213-11ea-b6f0-42010a8001db 10Gi RWO standard 17m
|
|
|
|
data-default-hashicorp-consul-server-2 Bound pvc-331581ea-1213-11ea-b6f0-42010a8001db 10Gi RWO standard 17m
|
|
|
|
|
|
|
|
$ kubectl delete pvc -l chart=consul-helm
|
|
|
|
persistentvolumeclaim "data-default-hashicorp-consul-server-0" deleted
|
|
|
|
persistentvolumeclaim "data-default-hashicorp-consul-server-1" deleted
|
|
|
|
persistentvolumeclaim "data-default-hashicorp-consul-server-2" deleted
|
|
|
|
```
|