From bd7cea3e9aacbb3a33552fd8009264dc0b58feb6 Mon Sep 17 00:00:00 2001 From: David Yu Date: Thu, 16 Dec 2021 20:26:48 -0800 Subject: [PATCH] docs: remove BETA from Consul K8s CLI (#11863) * docs: remove BETA from Consul K8s CLI --- website/content/docs/k8s/index.mdx | 2 +- .../content/docs/k8s/installation/install.mdx | 8 +- website/content/docs/k8s/k8s-cli.mdx | 116 ++++++++++++++++-- .../docs/k8s/upgrade/compatibility.mdx | 3 +- 4 files changed, 110 insertions(+), 19 deletions(-) diff --git a/website/content/docs/k8s/index.mdx b/website/content/docs/k8s/index.mdx index cfb7aead5..e3efa8d0d 100644 --- a/website/content/docs/k8s/index.mdx +++ b/website/content/docs/k8s/index.mdx @@ -11,7 +11,7 @@ description: >- # Kubernetes Consul has many integrations with Kubernetes. You can deploy Consul -to Kubernetes using the [Helm chart](/docs/k8s/installation/install#helm-chart-installation) or [Consul K8s CLIBETA](/docs/k8s/installation/install#consul-k8s-cli-installation), sync services between Consul and +to Kubernetes using the [Helm chart](/docs/k8s/installation/install#helm-chart-installation) or [Consul K8s CLI](/docs/k8s/installation/install#consul-k8s-cli-installation), sync services between Consul and Kubernetes, run Consul Connect Service Mesh, and more. This section documents the official integrations between Consul and Kubernetes. diff --git a/website/content/docs/k8s/installation/install.mdx b/website/content/docs/k8s/installation/install.mdx index 291213446..7d08773cf 100644 --- a/website/content/docs/k8s/installation/install.mdx +++ b/website/content/docs/k8s/installation/install.mdx @@ -1,6 +1,6 @@ --- layout: docs -page_title: Install with Helm Chart - Kubernetes +page_title: Installing Consul on Kubernetes description: >- Consul can run directly on Kubernetes, both in server or client mode. For pure-Kubernetes workloads, this enables Consul to also exist purely within @@ -17,7 +17,7 @@ a server running inside or outside of Kubernetes. You can install Consul on Kubernetes using the following methods: -1. [Consul K8s CLI install BETA.](#consul-k8s-cli-installation) +1. [Consul K8s CLI install](#consul-k8s-cli-installation) 1. [Helm chart install](#helm-chart-installation) Refer to the [architecture](/docs/k8s/installation/install#architecture) section to learn more about the general architecture of Consul on Kubernetes. @@ -29,8 +29,6 @@ mesh](https://learn.hashicorp.com/tutorials/consul/service-mesh-deploy?utm_sourc We recommend using the [Consul K8S CLI](/docs/k8s/k8s-cli) to install Consul on Kubernetes for single-cluster deployments. You can install Consul on Kubernetes using the Consul K8s CLI tool after installing the CLI. --> **Consul K8s CLI is currently in beta**: The tools is not recommended for production environments. - Before beginning the installation process, verify that `kubectl` is already configured to authenticate to the Kubernetes cluster using a valid `kubeconfig` file. The [Homebrew](https://brew.sh) package manager is required to complete the following installation instructions. @@ -121,7 +119,7 @@ The Consul Helm only supports Helm 3.2+. Install the latest version of the Helm ```shell-session $ helm search repo hashicorp/consul NAME CHART VERSION APP VERSION DESCRIPTION - hashicorp/consul 0.35.0 1.10.3 Official HashiCorp Consul Chart + hashicorp/consul 0.39.0 1.11.1 Official HashiCorp Consul Chart ``` 1. Prior to installing via Helm, ensure that the `consul` Kubernetes namespace does not exist, as installing on a dedicated namespace diff --git a/website/content/docs/k8s/k8s-cli.mdx b/website/content/docs/k8s/k8s-cli.mdx index fcea2725f..2b55f25c3 100644 --- a/website/content/docs/k8s/k8s-cli.mdx +++ b/website/content/docs/k8s/k8s-cli.mdx @@ -10,8 +10,6 @@ description: >- Consul K8s CLI is a tool for quickly installing and interacting with Consul on Kubernetes. This topic describes the commands, subcommands, and available options for using Consul K8s CLI. -~> Consul K8s CLI is is currently availabe as a beta release and is not recommended for production environments. - ## Install the Consul K8s CLI The [Homebrew](https://brew.sh) package manager is required to complete the following installation instructions. @@ -36,7 +34,23 @@ The [Homebrew](https://brew.sh) package manager is required to complete the foll ```shell-session consul-k8s version - consul-k8s 0.36.0 + consul-k8s 0.39.0 + ``` + +## Upgrade the Consul K8s CLI + +The [Homebrew](https://brew.sh) package manager is required to complete the following installation instructions. The `brew upgrade` command assumes that Hashicorp `tap` repository has already been installed from a prior install. + +1. Upgrade the Consul K8s CLI with the latest `consul-k8s` package. + ```shell-session + brew upgrade consul-k8s + ``` + +2. (Optional) Issue the `consul-k8s version` command to verify the installation: + + ```shell-session + consul-k8s version + consul-k8s 0.39.0 ``` ## Usage @@ -51,6 +65,12 @@ consul-k8s You can use the following subcommands with `consul-k8s`. + - [install](#install) + - [uninstall](#uninstall) + - [status](#status) + - [upgrade](#upgrade) BETA + - [version](#version) + ### `install` The `install` command installs Consul on Kubernetes. @@ -71,9 +91,9 @@ The following options are available. | `-set` | String value that enables you to set a customizeable value. This flag is comparable to the `helm install --set` flag.
You can use the `-set` flag multiple times to set multiple values.
Consul Helm chart values are supported. | none | Optional | | `-set-file` | String value that specifies the name of an arbitrary config file. This flag is comparable to the `helm install --set-file`
flag. The contents of the file will be used to set a customizeable value. You can use the `-set-file` flag multiple times to specify multiple files.
Consul Helm chart values are supported. | none | Optional | | `-set-string` | String value that enables you to set a customizeable string value. This flag is comparable to the `helm install --set-string`
flag. You can use the `-set-string` flag multiple times to specify multiple strings.
Consul Helm chart values are supported. | none | Optional | -| `-timeout` | Specifies how long to wait for the installation process to complete before timing out. The value is specified with an integer and string value indicating a unit of time.
The following units are supported:
`ms` (milliseconds)
`s` (seconds)
`m` (minutes)
In the following example, installation will timeout after one minute:
`consul-k8s install -timeout 1m` | Optional | `10m` | -| `-wait` | Boolean value that determines if Consul should wait for resources in the installation to be ready before exiting the command. | Optional | `true` | -| `-verbose`, `-v` | Boolean value that specifies whether to output verbose logs from the install command with the status of resources being installed. | Optional | `false` | +| `-timeout` | Specifies how long to wait for the installation process to complete before timing out. The value is specified with an integer and string value indicating a unit of time.
The following units are supported:
`ms` (milliseconds)
`s` (seconds)
`m` (minutes)
In the following example, installation will timeout after one minute:
`consul-k8s install -timeout 1m` | `10m` | Optional | +| `-wait` | Boolean value that determines if Consul should wait for resources in the installation to be ready before exiting the command. | `true` | Optional | +| `-verbose`, `-v` | Boolean value that specifies whether to output verbose logs from the install command with the status of resources being installed. | `false` | Optional | | `--help` | Prints usage information for this option. | none | Optional | See [Global Options](#global-options) for additional commands that you can use when installing Consul on Kubernetes. @@ -112,8 +132,8 @@ The following options are available. | `-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 | -| `-timeout` | Specifies how long to wait for the removal process to complete before timing out. The value is specified with an integer and string value indicating a unit of time.
The following units are supported:
`ms` (milliseconds)
`s` (seconds)
`m` (minutes)
`h` (hours)
In the following example, removal will timeout after one minute:
`consul-k8s uninstall -timeout 1m` | Optional | `10m` | -| `-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 | +| `-timeout` | Specifies how long to wait for the removal process to complete before timing out. The value is specified with an integer and string value indicating a unit of time.
The following units are supported:
`ms` (milliseconds)
`s` (seconds)
`m` (minutes)
`h` (hours)
In the following example, removal will timeout after one minute:
`consul-k8s uninstall -timeout 1m` | `10m` | 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 | | `--help` | Prints usage information for this option. | none | Optional | See [Global Options](#global-options) for additional commands that you can use when uninstalling Consul from Kubernetes. @@ -126,16 +146,88 @@ The following example command immediately uninstalls Consul from the `my-ns` nam consul-k8s uninstall -namespace=my-ns -name=my-consul -wipe-data=true -auto-approve=true ``` -## `version` +### `status` -The `version` command prints the Consul version. +The `status` command provides an overall status summary of the Consul on Kubernetes installation. It also provides the config that was used to deploy Consul K8s and provides a quick glance at the health of both Consul servers and clients. This command does not take in any flags. + +```shell-session +consul-k8s status +``` + +#### Example Command + +```shell-session +$ consul-k8s status + +==> Consul-K8s Status Summary + NAME | NAMESPACE | STATUS | CHARTVERSION | APPVERSION | REVISION | LAST UPDATED +---------+-----------+----------+--------------+------------+----------+-------------------------- + consul | consul | deployed | 0.39.0 | 1.11.1 | 1 | 2021/12/16 15:42:39 PST + +==> Config: + connectInject: + enabled: true + metrics: + defaultEnableMerging: true + defaultEnabled: true + enableGatewayMetrics: trueU + controller: + enabled: true + global: + metrics: + enableAgentMetrics: true + enabled: true + name: consul + prometheus: + enabled: true + server: + replicas: 1 + ui: + enabled: true + service: + enabled: true + + ✓ Consul servers healthy (1/1) + ✓ Consul clients healthy (3/3) +``` + +### `upgrade` + +-> The `consul-k8s upgrade` **subcommand is currently in beta**: This subcommand is not recommended for production environments. + +The `upgrade` command upgrades the Consul on Kubernetes components to the current version of the `consul-k8s` cli. Prior to running `consul-k8s upgrade`, the `consul-k8s` CLI should first be upgraded to the latest version as described [Upgrade the Consul K8s CLI](#upgrade-the-consul-k8s-cli) + +```shell-session +consul-k8s upgrade +``` + +The following options are available. + +| Flag | Description | Default | Required | +| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | -------- | +| `-auto-approve`                                     | Boolean value that enables you to skip the upgrade confirmation prompt. | `false` | Optional | +| `-dry-run` | Boolean value that allows you to run pre-upgrade checks and returns a summary of the upgrade. | `false` | Optional | +| `-config-file` | String value that specifies the path to a file containing custom upgrade configurations, e.g., Consul Helm chart values file.
You can use the `-config-file` flag multiple times to specify multiple files. | none | Optional | +| `-namespace` | String value that specifies the namespace of the Consul installation. | `consul` | Optional | +| `-preset` | String value that upgrades Consul based on a preset configuration. | Configuration of the Consul Helm chart. | Optional | +| `-set` | String value that enables you to set a customizeable value. This flag is comparable to the `helm upgrade --set` flag.
You can use the `-set` flag multiple times to set multiple values.
Consul Helm chart values are supported. | none | Optional | +| `-set-file` | String value that specifies the name of an arbitrary config file. This flag is comparable to the `helm upgrade --set-file`
flag. The contents of the file will be used to set a customizeable value. You can use the `-set-file` flag multiple times to specify multiple files.
Consul Helm chart values are supported. | none | Optional | +| `-set-string` | String value that enables you to set a customizeable string value. This flag is comparable to the `helm upgrade --set-string`
flag. You can use the `-set-string` flag multiple times to specify multiple strings.
Consul Helm chart values are supported. | none | Optional | +| `-timeout` | Specifies how long to wait for the upgrade process to complete before timing out. The value is specified with an integer and string value indicating a unit of time.
The following units are supported:
`ms` (milliseconds)
`s` (seconds)
`m` (minutes)
In the following example, the upgrade will timeout after one minute:
`consul-k8s upgrade -timeout 1m` | `10m` | Optional | +| `-wait` | Boolean value that determines if Consul should wait for resources in the upgtrade to be ready before exiting the command. | `true` | Optional | +| `-verbose`, `-v` | Boolean value that specifies whether to output verbose logs from the upgrade command with the status of resources being upgraded. | `false` | Optional | +| `--help` | Prints usage information for this option. | none | Optional | + +See [Global Options](#global-options) for additional commands that you can use when installing Consul on Kubernetes. + +### `version` + +The `version` command prints the Consul on Kubernetes version. This command does not take any options. ```shell-session consul-k8s version ``` -This command does not take any options. - You can also print the version with the `--version` flag. ```shell-session diff --git a/website/content/docs/k8s/upgrade/compatibility.mdx b/website/content/docs/k8s/upgrade/compatibility.mdx index 3df5b8f5a..faa2d2595 100644 --- a/website/content/docs/k8s/upgrade/compatibility.mdx +++ b/website/content/docs/k8s/upgrade/compatibility.mdx @@ -14,7 +14,8 @@ the Helm chart which will ensure a compatible version of the Consul Kubernetes b | Consul Version | Compatible Consul Helm Versions | | -------------- | ------------------------------- | -| 1.10.x | 0.32.0 - latest | +| 1.11.x | 0.39.0 - latest | +| 1.10.x | 0.32.0 - 0.38.0 | | 1.9.x | 0.27.0 - 0.31.1 | | 1.8.x | 0.22.0 - 0.26.0 | | 1.7.x | 0.17.0 - 0.21.0 |