From 4047b3081557fbf40dc69f1287ed617c6ef3d372 Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Thu, 16 Sep 2021 16:32:13 -0700 Subject: [PATCH] applied additional feedback, updated uninstall flags --- .../content/docs/k8s/installation/install.mdx | 24 ++++++++++-------- website/content/docs/k8s/k8s-cli.mdx | 25 +++++++++---------- .../content/docs/k8s/operations/uninstall.mdx | 12 +++++++-- 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/website/content/docs/k8s/installation/install.mdx b/website/content/docs/k8s/installation/install.mdx index b44aefced..859e752e1 100644 --- a/website/content/docs/k8s/installation/install.mdx +++ b/website/content/docs/k8s/installation/install.mdx @@ -15,7 +15,11 @@ For pure-Kubernetes workloads, this enables Consul to also exist purely within Kubernetes. For heterogeneous workloads, Consul agents can join a server running inside or outside of Kubernetes. -You can install Consul on Kubernetes using the Helm chart or by using the Consul K8s CLI tool ALPHA. +You can install Consul on Kubernetes using the following methods: + +1. [Helm chart install](#helm-chart-installation) +1. [Consul K8s CLI install ALPHA.](#consul-k8s-cli-installation) + Refer to the [architecture](/docs/k8s/installation/install#architecture) section to learn more about the general architecture of Consul on Kubernetes. For a hands-on experience with Consul as a service mesh for Kubernetes, follow the [Getting Started with Consul service @@ -72,11 +76,11 @@ hashicorp/consul 0.32.0 1.10.0 Official HashiCorp Consul Chart 1. Issue the following command to install Consul with the default configuration using Helm 3: -```shell-session -$ helm install consul hashicorp/consul --set global.name=consul -NAME: consul -... -``` +````shell-session + $ helm install consul hashicorp/consul --set global.name=consul + NAME: consul + ... + ``` The Helm chart does everything to set up a recommended Consul-on-Kubernetes deployment. After installation, a Consul cluster will be formed, a leader will be elected, and every node will have a running Consul agent. @@ -95,12 +99,12 @@ use the following config file: ```yaml global: - name: consul +name: consul connectInject: - enabled: true +enabled: true controller: - enabled: true -``` +enabled: true +```` diff --git a/website/content/docs/k8s/k8s-cli.mdx b/website/content/docs/k8s/k8s-cli.mdx index 166356a09..19d06b75c 100644 --- a/website/content/docs/k8s/k8s-cli.mdx +++ b/website/content/docs/k8s/k8s-cli.mdx @@ -80,29 +80,28 @@ consul-k8s uninstall The following options are available. -| Flag | Description | Default | Required | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | -------- | -| `-skip-confirm`                   | Boolean value that enables you to skip the removal confirmation prompt. | `false` | Optional | -| `-name` | String value for the name of the installation to remove. | none | Optional | -| `-namespace` | String value that specifies the namespace of the Consul installation to remove. | `consul` | Optional | -| `-auto-approve-wipe-data` | Boolan value that disables the prompt verifying that PVCs, secrets, and service accounts associated with the Consul installation _will be deleted_.
This flag cannot be applied if `auto-approve-skip-wipe-data` is also used. | `false`
A prompt will appear verifying that you want to delete data. | Optional | -| `-auto-approve-skip-wipe-data`                                                       | Boolan value that disables the prompt verifying that PVCs, secrets, and service accounts associated with the Consul installation _will be retained_.
This flag cannot be applied if `auto-approve-wipe-data` is also used. | `false`
A prompt will appear verifying that you want to delete data. | Optional | +| Flag | Description | Default | Required | +| --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------- | +| `-auto-approve`                                     | Boolean value that enables you to skip the removal confirmation prompt. | `false` | Optional | +| `-name` | String value for the name of the installation to remove. | none | Optional | +| `-namespace` | String value that specifies the namespace of the Consul installation to remove. | `consul` | Optional | +| `-wipe-data` | Boolan value that deletes PVCs and secrets associated with the Consul installation during installation.
Data will be removed without a verification prompt if the `-auto-approve` flag is set to `true`. | `false`
Instructions for removing data will be printed to the console. | Optional | See [Global Options](#global-options) for additional commands that you can use when uninstalling Consul from Kubernetes. #### Example Command -The following example command uninstalls Consul from the `my-ns` namespace with the name `my-consul`. +The following example command immediately uninstalls Consul from the `my-ns` namespace with the name `my-consul` and removes PVCs and secrets associated with the installation without asking for verification: ```shell-session -consul-k8s uninstall -name=my-consul -namespace=my-ns +consul-k8s uninstall -namespace=my-ns -name=my-consul -wipe-data=true -auto-approve=true ``` ## Global Options The following global options are available. -| Flag | Description | Default | Required | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------- | -------- | -| `-context`                   | String value that sets the Kubernetes context to use for Consul K8s CLI operations. | none | Optional | -| `-kubeconfig`
Alias: `-c` | String value that specifies the path to the `kubeconfig` file.
| none | Optional | +| Flag | Description | Default | Required | +| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------- | -------- | +| `-context`                   | String value that sets the Kubernetes context to use for Consul K8s CLI operations. | none | Optional | +| `-kubeconfig`
Alias: `-c` | String value that specifies the path to the `kubeconfig` file.
| none | Optional | diff --git a/website/content/docs/k8s/operations/uninstall.mdx b/website/content/docs/k8s/operations/uninstall.mdx index bc27c6a04..2fab0f98f 100644 --- a/website/content/docs/k8s/operations/uninstall.mdx +++ b/website/content/docs/k8s/operations/uninstall.mdx @@ -100,7 +100,15 @@ Run the `helm delete` **and** manually remove resources that Helm does not delet Issue the `consul-k8s uninstall` command to remove Consul from Kubernetes. ```shell-session -consul-k8s uninstall +$ consul-k8s uninstall ``` -You can specify the specific installation name, namespace, etc. using the applicable options. Refer to the [Consul K8s CLI reference](/docs/k8s/k8s-cli#uninstall) topic for details. +You can specify the installation name, namespace, and data retention behavior using the applicable options. + +In the following example, Consul will be uninstalled and the data removed without prompting you to verify the operations: + +```shell-session +$ consul-k8s uninstall -auto-approve=true -wipe-data=true +``` + +Refer to the [Consul K8s CLI reference](/docs/k8s/k8s-cli#uninstall) topic for details.