Skip to content

Commit

Permalink
docs: fix GATEWAY_HOST address for v1.0.2 and latest docs (envoyproxy…
Browse files Browse the repository at this point in the history
…#3676)

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg authored Jun 26, 2024
1 parent fa5ccfb commit d784c32
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion site/content/en/latest/tasks/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You can also test the same functionality by sending traffic to the External IP.
Envoy service, run:

```shell
export GATEWAY_HOST=$(kubectl get svc/${ENVOY_SERVICE} -n envoy-gateway-system -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export GATEWAY_HOST=$(kubectl get gateway/eg -o jsonpath='{.status.addresses[0].value}')
```

In certain environments, the load balancer may be exposed using a hostname, instead of an IP address. If so, replace
Expand Down
39 changes: 23 additions & 16 deletions site/content/en/v1.0.2/tasks/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ weight: 1
description: Get started with Envoy Gateway in a few simple steps.
---

This guide will help you get started with Envoy Gateway in a few simple steps.
This "quick start" will help you get started with Envoy Gateway in a few simple steps.

## Prerequisites

Expand Down Expand Up @@ -47,42 +47,49 @@ consideration when debugging.

## Testing the Configuration

Get the name of the Envoy service created the by the example Gateway:
{{< tabpane text=true >}}
{{% tab header="With External LoadBalancer Support" %}}

```shell
export ENVOY_SERVICE=$(kubectl get svc -n envoy-gateway-system --selector=gateway.envoyproxy.io/owning-gateway-namespace=default,gateway.envoyproxy.io/owning-gateway-name=eg -o jsonpath='{.items[0].metadata.name}')
```

Port forward to the Envoy service:
You can also test the same functionality by sending traffic to the External IP. To get the external IP of the
Envoy service, run:

```shell
kubectl -n envoy-gateway-system port-forward service/${ENVOY_SERVICE} 8888:80 &
export GATEWAY_HOST=$(kubectl get gateway/eg -o jsonpath='{.status.addresses[0].value}')
```

In certain environments, the load balancer may be exposed using a hostname, instead of an IP address. If so, replace
`ip` in the above command with `hostname`.

Curl the example app through Envoy proxy:

```shell
curl --verbose --header "Host: www.example.com" http://localhost:8888/get
curl --verbose --header "Host: www.example.com" http://$GATEWAY_HOST/get
```

### External LoadBalancer Support
{{% /tab %}}
{{% tab header="Without LoadBalancer Support" %}}

You can also test the same functionality by sending traffic to the External IP. To get the external IP of the
Envoy service, run:
Get the name of the Envoy service created the by the example Gateway:

```shell
export GATEWAY_HOST=$(kubectl get svc/${ENVOY_SERVICE} -n envoy-gateway-system -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export ENVOY_SERVICE=$(kubectl get svc -n envoy-gateway-system --selector=gateway.envoyproxy.io/owning-gateway-namespace=default,gateway.envoyproxy.io/owning-gateway-name=eg -o jsonpath='{.items[0].metadata.name}')
```

In certain environments, the load balancer may be exposed using a hostname, instead of an IP address. If so, replace
`ip` in the above command with `hostname`.
Port forward to the Envoy service:

```shell
kubectl -n envoy-gateway-system port-forward service/${ENVOY_SERVICE} 8888:80 &
```

Curl the example app through Envoy proxy:

```shell
curl --verbose --header "Host: www.example.com" http://$GATEWAY_HOST/get
curl --verbose --header "Host: www.example.com" http://localhost:8888/get
```

{{% /tab %}}
{{< /tabpane >}}

## What to explore next?

In this quickstart, you have:
Expand Down

0 comments on commit d784c32

Please sign in to comment.