Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: manual backport #20697 #20701

Merged
merged 9 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 90 additions & 37 deletions website/content/docs/api-gateway/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

<Tabs>

<Tab heading="Reference configuration">
<CodeBlockConfig filename="values.yaml">

```yaml
global:
name: consul
Expand All @@ -21,45 +24,95 @@ The Consul API gateway ships with Consul and is automatically installed when you
apiGateway:
manageExternalCRDs: true
```

</CodeBlockConfig>

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.
</Tab>

<Tab heading="OpenShift">

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.

<CodeBlockConfig filename="values.yaml">

```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"
```
</CodeBlockConfig>
</Tab>

<Tab heading="GKE Autopilot">

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.

<CodeBlockConfig filename="values.yaml">

```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"
```
</CodeBlockConfig>
</Tab>

</Tabs>

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.

<Tabs>
<Tab heading="Consul K8s CLI (Mac Only)">

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
```

</Tab>
<Tab heading="Helm">

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
```
</Tab>
</Tabs>
<Tabs>
<Tab heading="Consul K8s CLI (Mac Only)">
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
```
</Tab>
<Tab heading="Helm">
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
```
</Tab>
</Tabs>

<!--
****** KEEP ALL PAGE CONTENT ABOVE THIS LINE *******
Expand Down
38 changes: 38 additions & 0 deletions website/content/docs/k8s/installation/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,44 @@ 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.

<CodeBlockConfig filename="values.yaml">

```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"
```

</CodeBlockConfig>

### 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).
Expand Down
5 changes: 0 additions & 5 deletions website/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ module.exports = [
destination: '/consul/docs/connect/gateways/agi-gateway',
permanent: true,
},
{
source: '/consul/docs/api-gateway/install',
destination: '/consul/docs/connect/gateways/api-gateway/deploy/install-k8s',
permanent: true,
},
{
source: '/consul/docs/api-gateway/usage/reroute-http-requests',
destination:
Expand Down
Loading