Skip to content

Commit

Permalink
docs: Update uninstall to ensure CRDs are deleted (#12021)
Browse files Browse the repository at this point in the history
* docs: Update uninstall to ensure CRDs are deleted

* Update website/content/docs/k8s/operations/uninstall.mdx

Co-authored-by: Blake Covarrubias <blake@covarrubi.as>

* add more details around CRD deletion

* move around crd deletion to before unsintall

* slight wording

* move deletion of CRDs to first line

Co-authored-by: Blake Covarrubias <blake@covarrubi.as>
  • Loading branch information
david-yu and blake committed Jan 11, 2022
1 parent e0537cb commit d20230f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions website/content/docs/k8s/operations/uninstall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,26 @@ Refer to the [Consul K8s CLI reference](/docs/k8s/k8s-cli#uninstall) topic for d

Run the `helm uninstall` **and** manually remove resources that Helm does not delete.

1. Although the Helm chart automates the deletion of CRDs upon the uninstallation of the Helm chart, sometimes the finalizers tied to those CRDs may not complete because the deletion of the CRDs rely on the Consul K8s controller running. Ensure that previously created CRDs for Consul on Kubernetes are deleted, so subsequent installs of Consul on Kubernetes on the same Kubernetes cluster do not get blocked.

```shell-session
$ kubectl delete crd --selector app=consul
```

1. (Optional) If Consul is installed in a dedicated namespace, set the kubeConfig context to the `consul` namespace. Otherwise, subsequent commands will need to include `-n consul`.

```
kubectl config set-context --current --namespace=consul
```


1. Run the `helm uninstall <release-name>` command and specify the release name you've installed Consul with, e.g.,:

```shell-session
$ helm uninstall consul
release "consul" uninstalled
```


1. After deleting the Helm release, you need to delete the `PersistentVolumeClaim`'s
for the persistent volumes that store Consul's data. A [bug](https://github.com/helm/helm/issues/5156) in Helm prevents PVCs from being deleted. Issue the following commands:
Expand Down Expand Up @@ -102,3 +109,9 @@ Run the `helm uninstall` **and** manually remove resources that Helm does not de
$ kubectl delete serviceaccount consul-tls-init
serviceaccount "consul-tls-init" deleted
```

1. (Optional) Delete the namespace (i.e. `consul` in the following example) that you have dedicated for installing Consul on Kubernetes.

```shell-session
$ kubectl delete ns consul
```

0 comments on commit d20230f

Please sign in to comment.