Skip to content

Commit

Permalink
backport of commit 2cfd6a4
Browse files Browse the repository at this point in the history
  • Loading branch information
trujillo-adam committed Jun 8, 2023
1 parent cdb7c5a commit 837de4e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 53 deletions.
79 changes: 30 additions & 49 deletions website/content/docs/api-gateway/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,11 @@ description: >-
Learn how to install custom resource definitions (CRDs) and configure the Helm chart so that you can run Consul API Gateway on your Kubernetes deployment.
---

# Install API Gateway for Kubernetes
# Install API gateway for Kubernetes

This topic describes how to install and configure Consul API Gateway.
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][tech-specs]. Refer to the [Release Notes][rel-notes] for any additional information about the version you are deploying.

## Requirements

Ensure that the environment you are deploying Consul API Gateway in meets the requirements listed in the [Technical Specifications][tech-specs]. This includes validating that the requirements for minimum versions of software are met. Refer to the [Release Notes][rel-notes] for the version of API Gateway you are deploying.

## Installation

1. Set the version of Consul API Gateway you are installing as an environment variable. The following steps use this environment variable in commands and configurations.

```shell-session
$ export VERSION=0.5.1
```

1. Issue the following command to install the CRDs:

```shell-session
$ kubectl apply --kustomize="github.com/hashicorp/consul-api-gateway/config/crd?ref=v$VERSION"
```

1. Create a `values.yaml` file for your Consul API Gateway deployment by copying the following content and running it in the environment where you set the `VERSION` environment variable. The Consul Helm chart uses this `values.yaml` file to deploy the API Gateway. Available versions of the [Consul](https://hub.docker.com/r/hashicorp/consul/tags) and [Consul API Gateway](https://hub.docker.com/r/hashicorp/consul-api-gateway/tags) Docker images can be found on DockerHub, with additional context on version compatibility published in [GitHub releases](https://github.com/hashicorp/consul-api-gateway/releases). For more options to configure your Consul API Gateway deployment through the Helm chart, refer to [Helm Chart Configuration - apiGateway](/consul/docs/k8s/helm#apigateway).
1. Create a `values.yaml` file for configuring your Consul API gateway deployment and include the following settings:

<CodeBlockConfig filename="values.yaml">

Expand All @@ -37,47 +19,46 @@ Ensure that the environment you are deploying Consul API Gateway in meets the re
name: consul
connectInject:
enabled: true
apiGateway:
enabled: true
image: hashicorp/consul-api-gateway:$VERSION
EOF
```
</CodeBlockConfig>
1. Install Consul API Gateway using the standard Consul Helm chart or Consul K8s CLI specify the custom values file. Available versions of the [Consul Helm chart](https://github.com/hashicorp/consul-k8s/releases) can be found in GitHub releases.
The Consul Helm chart deploys the API gateway using configuration specified in the `values.yaml` file. Refer to [Helm Chart Configuration - apiGateway](/consul/docs/k8s/helm#apigateway) for information about all Helm chart configuration options.
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)">
<Tabs>
<Tab heading="Consul K8s CLI (Mac Only)">
~> **Note:** Refer to the official [Consul K8S CLI documentation](/consul/docs/k8s/k8s-cli) to find additional settings.
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 tap hashicorp/tap
```
```shell-session
$ brew install hashicorp/tap/consul-k8s
```
```shell-session
$ brew install hashicorp/tap/consul-k8s
```
```shell-session
$ consul-k8s install -config-file=values.yaml -set global.image=hashicorp/consul:1.14.3
```
```shell-session
$ consul-k8s install -config-file=values.yaml -set global.image=hashicorp/consul:1.14.3
```
</Tab>
<Tab heading="Helm">
</Tab>
<Tab heading="Helm">
Add the HashiCorp Helm repository.
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 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.0.2 --values values.yaml --create-namespace --namespace consul
```
</Tab>
</Tabs>
```shell-session
$ helm install consul hashicorp/consul --version 1.0.2 --values values.yaml --create-namespace --namespace consul
```
</Tab>
</Tabs>
<!--
****** KEEP ALL PAGE CONTENT ABOVE THIS LINE *******
Expand Down
7 changes: 3 additions & 4 deletions website/content/docs/api-gateway/tech-specs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ Your datacenter must meet the following requirements prior to configuring the Co

- Kubernetes 1.21+
- `kubectl` 1.21+
- Consul 1.11.2+
- HashiCorp Consul Helm chart 0.47.1+
- Consul Service Mesh must be deployed on the Kubernetes cluster that API Gateway is deployed on.
- Envoy: Envoy proxy support is determined by the Consul version deployed. Refer to [Envoy Integration](/consul/docs/connect/proxies/envoy) for details.
- HashiCorp Consul Helm chart 1.20.0
- Consul service mesh must be deployed on the Kubernetes cluster that API gateway is deployed on.
- Envoy proxy support is determined by the Consul version deployed. Refer to [Envoy Integration](/consul/docs/connect/proxies/envoy) for details.

### TCP Port Requirements

Expand Down

0 comments on commit 837de4e

Please sign in to comment.