From 9f3a83a8b720d6945403fe1c16c90c5d8e7c2a30 Mon Sep 17 00:00:00 2001 From: David Yu Date: Thu, 22 Feb 2024 09:47:52 -0800 Subject: [PATCH 1/9] manual backport --- website/content/docs/api-gateway/install.mdx | 63 +++++++++++++++++-- .../content/docs/k8s/installation/install.mdx | 36 +++++++++++ 2 files changed, 94 insertions(+), 5 deletions(-) diff --git a/website/content/docs/api-gateway/install.mdx b/website/content/docs/api-gateway/install.mdx index 3dc4ca7289ab..65be0894da28 100644 --- a/website/content/docs/api-gateway/install.mdx +++ b/website/content/docs/api-gateway/install.mdx @@ -9,10 +9,13 @@ description: >- The Consul API gateway ships with Consul and is automatically installed when you install Consul on Kubernetes. Before you begin the installation process, verify that the environment you are deploying Consul and the API gateway in meets the requirements listed in the [Technical Specifications](/consul/docs/api-gateway/tech-specs). Refer to the [Release Notes](/consul/docs/release-notes) for any additional information about the version you are deploying. -1. Create a `values.yaml` file for configuring your Consul API gateway deployment and include the following settings: +1. The Consul Helm chart deploys the API gateway using the configuration specified in the `values.yaml` file. Refer to [Helm Chart Configuration - `connectInject.apiGateway`](/consul/docs/k8s/helm#apigateway) for information about the Helm chart configuration options. Create a `values.yaml` file for configuring your Consul API gateway deployment and include the following settings: + + + - + ```yaml global: name: consul @@ -21,10 +24,60 @@ The Consul API gateway ships with Consul and is automatically installed when you apiGateway: manageExternalCRDs: true ``` - + - - The Consul Helm chart deploys the API gateway using the configuration specified in the `values.yaml` file. Refer to [Helm Chart Configuration - `connectInject.apiGateway`](/consul/docs/k8s/helm#apigateway) for information about the Helm chart configuration options. + + + + + If you are installing Consul on an OpenShift Kubernetes cluster, you must include the `global.openShift.enabled` parameter and set it to `true`. Refer to [OpenShift requirements](/consul/docs/connect/gateways/api-gateway/tech-specs#openshift-requirements) for additional information. + + + + ```yaml + global: + openshift: + enabled: true + connectInject: + enabled: true + apiGateway: + manageExternalCRDs: true + cni: + enabled: true + logLevel: info + multus: true + cniBinDir: "/var/lib/cni/bin" + cniNetDir: "/etc/kubernetes/cni/net.d" + ``` + + + + + +By default, GKE Autopilot installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate the pre-installed Gateway API CRDs. + +The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. + + + + ```yaml + global: + name: consul + connectInject: + enabled: true + apiGateway: + manageExternalCRDs: false + manageNonStandardCRDs: true + cni: + enabled: true + logLevel: info + cniBinDir: "/home/kubernetes/bin" + cniNetDir: "/etc/cni/net.d" + ``` + + + + 1. Install Consul API Gateway using the standard Consul Helm chart or Consul K8s CLI specify the custom values file. Refer to the [Consul Helm chart](https://github.com/hashicorp/consul-k8s/releases) in GitHub releases for the available versions. diff --git a/website/content/docs/k8s/installation/install.mdx b/website/content/docs/k8s/installation/install.mdx index 78f90f480797..2947de3945a7 100644 --- a/website/content/docs/k8s/installation/install.mdx +++ b/website/content/docs/k8s/installation/install.mdx @@ -104,6 +104,42 @@ NAME: consul ... ``` +### Install Consul on OpenShift clusters + +[Red Hat OpenShift](https://www.redhat.com/en/technologies/cloud-computing/openshift) is a security-conscious, opinionated wrapper for Kubernetes. To install Consul on OpenShift-managed Kubernetes, set `global.openshift.enabled=true` in your [custom installation](#custom-installation) values file: +```yaml +global: + openshift: + enabled: true + ``` + +Refer to [`openshift` in the Helm chart reference](/consul/docs/k8s/helm#v-global-openshift) for additional information regarding the OpenShift stanza. In addition, refer to the [Deploy Consul on RedHat OpenShift tutorial](/consul/tutorials/kubernetes/kubernetes-openshift-red-hat) for a complete working example that deploys Consul Service Mesh using Red Hat Certified UBI images. + + ### Install Consul on GKE Autopilot + +GKE Autopilot provides a fully managed environment for containerized workloads and requires the Consul CNI plugin to be installed. Refer to [Enable the Consul CNI plugin](#enable-the-consul-cni-plugin) for a full reference on how to enable the CNI plugin. + +By default, GKE Autopilot also installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate for the pre-installed Gateway API CRDs. + +The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. + + +```yaml +global: + name: consul +connectInject: + enabled: true + apiGateway: + manageExternalCRDs: false + manageNonStandardCRDs: true + cni: + enabled: true + logLevel: info + cniBinDir: "/home/kubernetes/bin" + cniNetDir: "/etc/cni/net.d" +``` + + ### Enable the Consul CNI plugin By default, Consul injects a `connect-inject-init` init container as part of the Kubernetes pod startup process when Consul is in [transparent proxy mode](/consul/docs/connect/transparent-proxy). From 31c271c36e7bf82869bdd226d7e7e012bb8e7ca1 Mon Sep 17 00:00:00 2001 From: David Yu Date: Thu, 22 Feb 2024 09:56:28 -0800 Subject: [PATCH 2/9] formatting --- website/content/docs/api-gateway/install.mdx | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/content/docs/api-gateway/install.mdx b/website/content/docs/api-gateway/install.mdx index 65be0894da28..7eba6f704fc7 100644 --- a/website/content/docs/api-gateway/install.mdx +++ b/website/content/docs/api-gateway/install.mdx @@ -13,8 +13,8 @@ The Consul API gateway ships with Consul and is automatically installed when you - - + + ```yaml global: @@ -25,14 +25,14 @@ The Consul API gateway ships with Consul and is automatically installed when you manageExternalCRDs: true ``` - - + + - + If you are installing Consul on an OpenShift Kubernetes cluster, you must include the `global.openShift.enabled` parameter and set it to `true`. Refer to [OpenShift requirements](/consul/docs/connect/gateways/api-gateway/tech-specs#openshift-requirements) for additional information. - + ```yaml global: @@ -49,16 +49,16 @@ The Consul API gateway ships with Consul and is automatically installed when you cniBinDir: "/var/lib/cni/bin" cniNetDir: "/etc/kubernetes/cni/net.d" ``` - - + + - + By default, GKE Autopilot installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate the pre-installed Gateway API CRDs. The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. - + ```yaml global: @@ -74,10 +74,10 @@ The following working example enables both Consul Service Mesh and Consul API Ga cniBinDir: "/home/kubernetes/bin" cniNetDir: "/etc/cni/net.d" ``` - - + + - + 1. Install Consul API Gateway using the standard Consul Helm chart or Consul K8s CLI specify the custom values file. Refer to the [Consul Helm chart](https://github.com/hashicorp/consul-k8s/releases) in GitHub releases for the available versions. From 41785d18a30358b5ed02263edcccbdf4332f8228 Mon Sep 17 00:00:00 2001 From: David Yu Date: Thu, 22 Feb 2024 10:02:01 -0800 Subject: [PATCH 3/9] formatting --- website/content/docs/api-gateway/install.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/docs/api-gateway/install.mdx b/website/content/docs/api-gateway/install.mdx index 7eba6f704fc7..1d0318ee5311 100644 --- a/website/content/docs/api-gateway/install.mdx +++ b/website/content/docs/api-gateway/install.mdx @@ -54,9 +54,9 @@ The Consul API gateway ships with Consul and is automatically installed when you -By default, GKE Autopilot installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate the pre-installed Gateway API CRDs. + By default, GKE Autopilot installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate the pre-installed Gateway API CRDs. -The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. + The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. From d268691adb704c0a719a73fade74b4ea64380487 Mon Sep 17 00:00:00 2001 From: David Yu Date: Thu, 22 Feb 2024 10:19:02 -0800 Subject: [PATCH 4/9] formatting --- website/content/docs/api-gateway/install.mdx | 37 ++++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/website/content/docs/api-gateway/install.mdx b/website/content/docs/api-gateway/install.mdx index 1d0318ee5311..e7897846fec0 100644 --- a/website/content/docs/api-gateway/install.mdx +++ b/website/content/docs/api-gateway/install.mdx @@ -54,30 +54,29 @@ The Consul API gateway ships with Consul and is automatically installed when you - By default, GKE Autopilot installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate the pre-installed Gateway API CRDs. - - The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. + By default, GKE Autopilot installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate the pre-installed Gateway API CRDs. + + The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. - ```yaml - global: - name: consul - connectInject: - enabled: true - apiGateway: - manageExternalCRDs: false - manageNonStandardCRDs: true - cni: - enabled: true - logLevel: info - cniBinDir: "/home/kubernetes/bin" - cniNetDir: "/etc/cni/net.d" - ``` + ```yaml + global: + name: consul + connectInject: + enabled: true + apiGateway: + manageExternalCRDs: false + manageNonStandardCRDs: true + cni: + enabled: true + logLevel: info + cniBinDir: "/home/kubernetes/bin" + cniNetDir: "/etc/cni/net.d" + ``` - - + 1. Install Consul API Gateway using the standard Consul Helm chart or Consul K8s CLI specify the custom values file. Refer to the [Consul Helm chart](https://github.com/hashicorp/consul-k8s/releases) in GitHub releases for the available versions. From 103fa9b2c42b0aeceab368f70177c2c01809db60 Mon Sep 17 00:00:00 2001 From: David Yu Date: Thu, 22 Feb 2024 10:26:25 -0800 Subject: [PATCH 5/9] formatting --- website/content/docs/api-gateway/install.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/api-gateway/install.mdx b/website/content/docs/api-gateway/install.mdx index e7897846fec0..1a4bcb507e96 100644 --- a/website/content/docs/api-gateway/install.mdx +++ b/website/content/docs/api-gateway/install.mdx @@ -30,7 +30,7 @@ The Consul API gateway ships with Consul and is automatically installed when you - If you are installing Consul on an OpenShift Kubernetes cluster, you must include the `global.openShift.enabled` parameter and set it to `true`. Refer to [OpenShift requirements](/consul/docs/connect/gateways/api-gateway/tech-specs#openshift-requirements) for additional information. + If you are installing Consul on an OpenShift Kubernetes cluster, you must include the `global.openShift.enabled` parameter and set it to `true`. Refer to [OpenShift requirements](/consul/docs/connect/gateways/api-gateway/tech-specs#openshift-requirements) for additional information. From 6aa5f1c06ca57989d464345023bb9649f0150ac8 Mon Sep 17 00:00:00 2001 From: David Yu Date: Thu, 22 Feb 2024 11:24:07 -0800 Subject: [PATCH 6/9] update formatting --- website/content/docs/api-gateway/install.mdx | 61 ++++++++++---------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/website/content/docs/api-gateway/install.mdx b/website/content/docs/api-gateway/install.mdx index 1a4bcb507e96..a2853ec520a2 100644 --- a/website/content/docs/api-gateway/install.mdx +++ b/website/content/docs/api-gateway/install.mdx @@ -13,8 +13,8 @@ The Consul API gateway ships with Consul and is automatically installed when you - - + + ```yaml global: @@ -25,14 +25,14 @@ The Consul API gateway ships with Consul and is automatically installed when you manageExternalCRDs: true ``` - - + + - + - If you are installing Consul on an OpenShift Kubernetes cluster, you must include the `global.openShift.enabled` parameter and set it to `true`. Refer to [OpenShift requirements](/consul/docs/connect/gateways/api-gateway/tech-specs#openshift-requirements) for additional information. + If you are installing Consul on an OpenShift Kubernetes cluster, you must include the `global.openShift.enabled` parameter and set it to `true`. Refer to [OpenShift requirements](/consul/docs/connect/gateways/api-gateway/tech-specs#openshift-requirements) for additional information. - + ```yaml global: @@ -49,33 +49,34 @@ The Consul API gateway ships with Consul and is automatically installed when you cniBinDir: "/var/lib/cni/bin" cniNetDir: "/etc/kubernetes/cni/net.d" ``` - - + + - - - By default, GKE Autopilot installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate the pre-installed Gateway API CRDs. + + + By default, GKE Autopilot installs [Gateway API resources](https://gateway-api.sigs.k8s.io), so we recommend customizing the `connectInject.apiGateway` stanza to accommodate the pre-installed Gateway API CRDs. + + The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. - The following working example enables both Consul Service Mesh and Consul API Gateway on GKE Autopilot. Refer to [`connectInject.agiGateway` in the Helm chart reference](https://developer.hashicorp.com/consul/docs/k8s/helm#v-connectinject-apigateway) for additional information. + - + ```yaml + global: + name: consul + connectInject: + enabled: true + apiGateway: + manageExternalCRDs: false + manageNonStandardCRDs: true + cni: + enabled: true + logLevel: info + cniBinDir: "/home/kubernetes/bin" + cniNetDir: "/etc/cni/net.d" + ``` + + - ```yaml - global: - name: consul - connectInject: - enabled: true - apiGateway: - manageExternalCRDs: false - manageNonStandardCRDs: true - cni: - enabled: true - logLevel: info - cniBinDir: "/home/kubernetes/bin" - cniNetDir: "/etc/cni/net.d" - ``` - - 1. Install Consul API Gateway using the standard Consul Helm chart or Consul K8s CLI specify the custom values file. Refer to the [Consul Helm chart](https://github.com/hashicorp/consul-k8s/releases) in GitHub releases for the available versions. From aa92b7be6b509edfbc27b1f837553e60e4b5f778 Mon Sep 17 00:00:00 2001 From: David Yu Date: Thu, 22 Feb 2024 13:23:19 -0800 Subject: [PATCH 7/9] Update install.mdx --- website/content/docs/api-gateway/install.mdx | 64 ++++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/website/content/docs/api-gateway/install.mdx b/website/content/docs/api-gateway/install.mdx index a2853ec520a2..55b7069f1467 100644 --- a/website/content/docs/api-gateway/install.mdx +++ b/website/content/docs/api-gateway/install.mdx @@ -81,38 +81,38 @@ The Consul API gateway ships with Consul and is automatically installed when you 1. Install Consul API Gateway using the standard Consul Helm chart or Consul K8s CLI specify the custom values file. Refer to the [Consul Helm chart](https://github.com/hashicorp/consul-k8s/releases) in GitHub releases for the available versions. - - - -Refer to the official [Consul K8S CLI documentation](/consul/docs/k8s/k8s-cli) to find additional settings. - -```shell-session -$ brew tap hashicorp/tap -``` - -```shell-session -$ brew install hashicorp/tap/consul-k8s -``` - -```shell-session -$ consul-k8s install -config-file=values.yaml -set global.image=hashicorp/consul:1.16.0 -``` - - - - -Add the HashiCorp Helm repository. - -```shell-session -$ helm repo add hashicorp https://helm.releases.hashicorp.com -``` -Install Consul with API Gateway on your Kubernetes cluster by specifying the `values.yaml` file. - -```shell-session -$ helm install consul hashicorp/consul --version 1.2.0 --values values.yaml --create-namespace --namespace consul -``` - - + + + + Refer to the official [Consul K8S CLI documentation](/consul/docs/k8s/k8s-cli) to find additional settings. + + ```shell-session + $ brew tap hashicorp/tap + ``` + + ```shell-session + $ brew install hashicorp/tap/consul-k8s + ``` + + ```shell-session + $ consul-k8s install -config-file=values.yaml -set global.image=hashicorp/consul:1.16.0 + ``` + + + + + Add the HashiCorp Helm repository. + + ```shell-session + $ helm repo add hashicorp https://helm.releases.hashicorp.com + ``` + Install Consul with API Gateway on your Kubernetes cluster by specifying the `values.yaml` file. + + ```shell-session + $ helm install consul hashicorp/consul --version 1.2.0 --values values.yaml --create-namespace --namespace consul + ``` + +