Uninstall Consul

Consul can be uninstalled via the helm delete command:

  1. $ helm delete hashicorp
  2. 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. To delete, run:

  1. $ kubectl get pvc -l chart=consul-helm
  2. NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
  3. data-default-hashicorp-consul-server-0 Bound pvc-32cb296b-1213-11ea-b6f0-42010a8001db 10Gi RWO standard 17m
  4. data-default-hashicorp-consul-server-1 Bound pvc-32d79919-1213-11ea-b6f0-42010a8001db 10Gi RWO standard 17m
  5. data-default-hashicorp-consul-server-2 Bound pvc-331581ea-1213-11ea-b6f0-42010a8001db 10Gi RWO standard 17m
  6. $ kubectl delete pvc -l chart=consul-helm
  7. persistentvolumeclaim "data-default-hashicorp-consul-server-0" deleted
  8. persistentvolumeclaim "data-default-hashicorp-consul-server-1" deleted
  9. persistentvolumeclaim "data-default-hashicorp-consul-server-2" deleted