From 8f8055352dcb216e36074aa6c73be4a327aaa5b7 Mon Sep 17 00:00:00 2001 From: David Yu Date: Wed, 3 Nov 2021 16:48:48 -0700 Subject: [PATCH] docs: consul-k8s uninstall with namespace (#11478) * docs: consul-k8s uninstall with namespace Uninstall with namespace * change release name to consul in uninstall * Update website/content/docs/k8s/operations/uninstall.mdx Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> * add --create-namespace command to install for custom values file Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/content/docs/k8s/installation/install.mdx | 2 +- website/content/docs/k8s/operations/uninstall.mdx | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/website/content/docs/k8s/installation/install.mdx b/website/content/docs/k8s/installation/install.mdx index 11bb780298..b7858192fb 100644 --- a/website/content/docs/k8s/installation/install.mdx +++ b/website/content/docs/k8s/installation/install.mdx @@ -124,7 +124,7 @@ controller: Once you've created your `config.yaml` file, run `helm install` with the `-f` flag: ```shell-session -$ helm install consul hashicorp/consul -f config.yaml +$ helm install consul hashicorp/consul --create-namespace -n consul -f config.yaml NAME: consul ... ``` diff --git a/website/content/docs/k8s/operations/uninstall.mdx b/website/content/docs/k8s/operations/uninstall.mdx index f570b0e351..ececce827c 100644 --- a/website/content/docs/k8s/operations/uninstall.mdx +++ b/website/content/docs/k8s/operations/uninstall.mdx @@ -12,11 +12,18 @@ You can uninstall Consul using Helm commands or the Consul K8s CLI. Run the `helm uninstall` **and** manually remove resources that Helm does not delete. -1. First, run `helm uninstall`: + +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 ` command and specify the release name you've installed Consul with, e.g.,: ```shell-session - $ helm uninstall hashicorp - release "hashicorp" uninstalled + $ helm uninstall consul + release "consul" uninstalled ``` 1. After deleting the Helm release, you need to delete the `PersistentVolumeClaim`'s