Browse Source

applied additional feedback, updated uninstall flags

pull/11028/head
trujillo-adam 3 years ago
parent
commit
183b021767
  1. 24
      website/content/docs/k8s/installation/install.mdx
  2. 25
      website/content/docs/k8s/k8s-cli.mdx
  3. 12
      website/content/docs/k8s/operations/uninstall.mdx

24
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 <sup>ALPHA</sup>.
You can install Consul on Kubernetes using the following methods:
1. [Helm chart install](#helm-chart-installation)
1. [Consul K8s CLI install <sup>ALPHA</sup>.](#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
````
</CodeBlockConfig>

25
website/content/docs/k8s/k8s-cli.mdx

@ -80,29 +80,28 @@ consul-k8s uninstall <OPTIONS>
The following options are available.
| Flag | Description | Default | Required |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | -------- |
| `-skip-confirm` &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 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_. <br/> This flag cannot be applied if `auto-approve-skip-wipe-data` is also used. | `false` <br/> A prompt will appear verifying that you want to delete data. | Optional |
| `-auto-approve-skip-wipe-data` &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Boolan value that disables the prompt verifying that PVCs, secrets, and service accounts associated with the Consul installation _will be retained_. <br/> This flag cannot be applied if `auto-approve-wipe-data` is also used. | `false` <br/> A prompt will appear verifying that you want to delete data. | Optional |
| Flag | Description | Default | Required |
| --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------- |
| `-auto-approve` &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 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. <br/> Data will be removed without a verification prompt if the `-auto-approve` flag is set to `true`. | `false` <br/> 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` &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | String value that sets the Kubernetes context to use for Consul K8s CLI operations. | none | Optional |
| `-kubeconfig` <br/> Alias: `-c` | String value that specifies the path to the `kubeconfig` file. <br/> | none | Optional |
| Flag | Description | Default | Required |
| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------- | -------- |
| `-context` &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | String value that sets the Kubernetes context to use for Consul K8s CLI operations. | none | Optional |
| `-kubeconfig` <br/> Alias: `-c` | String value that specifies the path to the `kubeconfig` file. <br/> | none | Optional |

12
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 <OPTIONS>
$ consul-k8s uninstall <OPTIONS>
```
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.

Loading…
Cancel
Save