consul/website/content/docs/api-gateway/install.mdx

69 lines
2.5 KiB
Plaintext
Raw Normal View History

---
layout: docs
page_title: Install API Gateway for Kubernetes
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
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:
2022-08-08 15:16:24 +00:00
<CodeBlockConfig filename="values.yaml">
2022-08-02 16:07:29 +00:00
2022-08-08 14:32:28 +00:00
```shell
cat <<EOF > values.yaml
global:
name: consul
connectInject:
enabled: true
EOF
```
</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.
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.
2022-07-21 20:12:49 +00:00
<Tabs>
<Tab heading="Consul K8s CLI (Mac Only)">
2022-07-21 20:12:49 +00:00
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
```
2022-07-21 20:12:49 +00:00
</Tab>
<Tab heading="Helm">
2022-07-21 20:12:49 +00:00
Add the HashiCorp Helm repository.
2022-07-21 20:12:49 +00:00
```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.
2022-07-21 22:21:22 +00:00
```shell-session
$ helm install consul hashicorp/consul --version 1.2.0 --values values.yaml --create-namespace --namespace consul
```
</Tab>
</Tabs>
2022-07-21 22:21:22 +00:00
2022-04-29 16:52:00 +00:00
<!--
2022-07-21 22:38:57 +00:00
****** KEEP ALL PAGE CONTENT ABOVE THIS LINE *******
Only Reference style links should be added below this comment
2022-04-29 16:52:00 +00:00
--->
2023-02-07 16:36:32 +00:00
[tech-specs]: /consul/docs/api-gateway/tech-specs
[rel-notes]: /consul/docs/release-notes