Use tabs for with and without TLS

This commit is contained in:
Thomas Eckert 2022-08-25 13:02:55 -04:00
parent ac129339f8
commit 884dda25c2
1 changed files with 19 additions and 13 deletions

View File

@ -6,8 +6,6 @@ description: Configuring Terminating Gateways on Kubernetes
# Terminating Gateways on Kubernetes
~> This topic requires familiarity with [Terminating Gateways](/docs/connect/gateways/terminating-gateway).
Adding a terminating gateway is a multi-step process:
- Update the Helm chart with terminating gateway config options
@ -15,6 +13,12 @@ Adding a terminating gateway is a multi-step process:
- Access the Consul agent
- Register external services with Consul
## Requirements
- [Consul]()
- [Consul on Kubernetes CLI]()
- Familiarity with [Terminating Gateways](/docs/connect/gateways/terminating-gateway)
## Update the helm chart with terminating gateway config options
Minimum required Helm options:
@ -39,36 +43,38 @@ terminatingGateways:
The Helm chart may be deployed using the [Consul on Kubernetes CLI](/docs/k8s/k8s-cli).
```shell-session
consul-k8s install -f config.yaml
$ consul-k8s install -f config.yaml
```
## Accessing the Consul agent
You can access the Consul server directly from your host via `kubectl port-forward`. This is helpful for interacting with your Consul UI locally as well as to validate connectivity of the application.
You can access the Consul server directly from your host via `kubectl port-forward`. This is helpful for interacting with your Consul UI locally as well as for validating the connectivity of the application.
<Tabs>
<Tab heading="Without TLS">
```shell-session
$ kubectl port-forward consul-server-0 8500 &
```
```shell-session
$ export CONSUL_HTTP_ADDR=http://localhost:8500
```
</Tab>
<Tab heading="With TLS">
If TLS is enabled use port 8501:
```shell-session
$ kubectl port-forward consul-server-0 8501 &
```
-> Be sure the latest consul binary is installed locally on your host.
[https://releases.hashicorp.com/consul/](https://releases.hashicorp.com/consul/)
```shell-session
$ export CONSUL_HTTP_ADDR=http://localhost:8500
```
If TLS is enabled set:
```shell-session
$ export CONSUL_HTTP_ADDR=https://localhost:8501
$ export CONSUL_HTTP_SSL_VERIFY=false
```
</Tab>
</Tabs>
If ACLs are enabled also set: