Skip to content
Open
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
6 changes: 5 additions & 1 deletion site/content/en/latest/tasks/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ Port forward to the Envoy service:
kubectl -n envoy-gateway-system port-forward service/${ENVOY_SERVICE} 8888:80 &
```

```shell
export GATEWAY_HOST=localhost:8888

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep GATEWAY_HOST host-only for downstream tasks

When users choose the new Without LoadBalancer path, this shared GATEWAY_HOST now includes a port, but several task pages that tell users to reuse the Quickstart variable still treat it as a bare address. For example, site/content/en/latest/tasks/security/jwt-authentication.md appends :80, producing localhost:8888:80, and site/content/en/latest/tasks/traffic/http-redirect.md passes it to curl --resolve, whose documented form is <[+]host:port:addr[,addr]...> and rejects localhost:8888 as the address. Please keep GATEWAY_HOST host-only and introduce a separate URL/port variable, or update the downstream consumers before exporting a port here.

Useful? React with 👍 / 👎.

```

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

{{% /tab %}}
Expand Down
35 changes: 30 additions & 5 deletions site/content/en/latest/tasks/traffic/grpc-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,39 @@ The `example-route` matches any traffic for "grpc-example.com" and forwards it t

Before testing GRPC routing to the `yages` backend, get the Gateway's address.

{{< tabpane text=true >}}
{{% tab header="With External LoadBalancer Support" %}}

```shell
export GATEWAY_HOST=$(kubectl get gateway/example-gateway -o jsonpath='{.status.addresses[0].value}'):80
```

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

Get the name of the Envoy service created by the example Gateway:

```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=example-gateway -o jsonpath='{.items[0].metadata.name}')
```

Port forward to the Envoy service:

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

```shell
export GATEWAY_HOST=localhost:8888
```

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

Test GRPC routing to the `yages` backend using the [grpcurl][] command.

```shell
grpcurl -plaintext -authority=grpc-example.com ${GATEWAY_HOST}:80 yages.Echo/Ping
grpcurl -plaintext -authority=grpc-example.com ${GATEWAY_HOST} yages.Echo/Ping
```

You should see the below response
Expand All @@ -80,7 +105,7 @@ Envoy Gateway also supports [gRPC-Web][] requests for this configuration. The be
The data in the body `AAAAAAA=` is a base64 encoded representation of an empty message (data length 0) that the Ping RPC accepts.

```shell
curl --http2-prior-knowledge -s ${GATEWAY_HOST}:80/yages.Echo/Ping -H 'Host: grpc-example.com' -H 'Content-Type: application/grpc-web-text' -H 'Accept: application/grpc-web-text' -XPOST -d'AAAAAAA=' | base64 -d
curl --http2-prior-knowledge -s ${GATEWAY_HOST}/yages.Echo/Ping -H 'Host: grpc-example.com' -H 'Content-Type: application/grpc-web-text' -H 'Accept: application/grpc-web-text' -XPOST -d'AAAAAAA=' | base64 -d
```

## GRPCRoute Match
Expand Down Expand Up @@ -171,7 +196,7 @@ kubectl get grpcroutes --selector=example=grpc-routing -o yaml
Test GRPC routing to the `yages` backend using the [grpcurl][] command.

```shell
grpcurl -plaintext -authority=grpc-example.com ${GATEWAY_HOST}:80 yages.Echo/Ping
grpcurl -plaintext -authority=grpc-example.com ${GATEWAY_HOST} yages.Echo/Ping
```

### RegularExpression
Expand Down Expand Up @@ -260,7 +285,7 @@ kubectl get grpcroutes --selector=example=grpc-routing -o yaml
Test GRPC routing to the `yages` backend using the [grpcurl][] command.

```shell
grpcurl -plaintext -authority=grpc-example.com ${GATEWAY_HOST}:80 yages.Echo/Ping
grpcurl -plaintext -authority=grpc-example.com ${GATEWAY_HOST} yages.Echo/Ping
```

## Configuring or disabling timeouts with `BackendTrafficPolicy`
Expand Down
5 changes: 3 additions & 2 deletions site/content/en/latest/tasks/traffic/http-redirect.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ The HTTPRoute status should indicate that it has been accepted and is bound to t
kubectl get httproute/http-to-https-filter-redirect -o yaml
```

Get the Gateway's address:
Ensure the `GATEWAY_HOST` environment variable from the [Quickstart](../../quickstart) is set. If not, follow the
Quickstart instructions to set the variable.

```shell
export GATEWAY_HOST=$(kubectl get gateway/eg -o jsonpath='{.status.addresses[0].value}')
echo $GATEWAY_HOST
Comment on lines +78 to +82

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore no-LoadBalancer host setup

For clusters without LoadBalancer support—the environment this docs change is meant to unblock—the Quickstart does not export GATEWAY_HOST; it only starts a port-forward and curls localhost:8888. After following these new lines, echo $GATEWAY_HOST remains blank and the curl below expands to an unusable http:///get URL (the same pattern was added to URL Rewrite and Timeouts), so the eg-based traffic tasks still cannot be followed on kind-like clusters. Please include the port-forward plus GATEWAY_HOST=localhost:8888 setup here or make Quickstart export it.

Useful? React with 👍 / 👎.

```

Querying `redirect.example/get` should result in a `301` response from the example Gateway and redirecting to the
Expand Down
25 changes: 25 additions & 0 deletions site/content/en/latest/tasks/traffic/http-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,35 @@ The `example-route` matches any traffic for "example.com" and forwards it to the

Before testing HTTP routing to the `example-svc` backend, get the Gateway's address.

{{< tabpane text=true >}}
{{% tab header="With External LoadBalancer Support" %}}

```shell
export GATEWAY_HOST=$(kubectl get gateway/example-gateway -o jsonpath='{.status.addresses[0].value}')
```

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

Get the name of the Envoy service created by the example Gateway:

```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=example-gateway -o jsonpath='{.items[0].metadata.name}')
```

Port forward to the Envoy service:

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

```shell
export GATEWAY_HOST=localhost:8888
```

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

Test HTTP routing to the `example-svc` backend.

```shell
Expand Down
7 changes: 7 additions & 0 deletions site/content/en/latest/tasks/traffic/http-timeouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ __Note:__ The Request duration must be >= BackendRequest duration

## Verification

Ensure the `GATEWAY_HOST` environment variable from the [Quickstart](../../quickstart) is set. If not, follow the
Quickstart instructions to set the variable.

```shell
echo $GATEWAY_HOST
```

backend has the ability to delay responses; we use it as the backend to control response time.

### request timeout
Expand Down
5 changes: 3 additions & 2 deletions site/content/en/latest/tasks/traffic/http-urlrewrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ The HTTPRoute status should indicate that it has been accepted and is bound to t
kubectl get httproute/http-filter-url-rewrite -o yaml
```

Get the Gateway's address:
Ensure the `GATEWAY_HOST` environment variable from the [Quickstart](../../quickstart) is set. If not, follow the
Quickstart instructions to set the variable.

```shell
export GATEWAY_HOST=$(kubectl get gateway/eg -o jsonpath='{.status.addresses[0].value}')
echo $GATEWAY_HOST
```

Querying `http://${GATEWAY_HOST}/get/origin/path` should rewrite to
Expand Down
25 changes: 25 additions & 0 deletions site/content/en/latest/tasks/traffic/tcp-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,35 @@ is taking traffic for port `8088` from outside the cluster and `bar` service tak

Before testing, please get the tcp-gateway [Gateway][]'s address first:

{{< tabpane text=true >}}
{{% tab header="With External LoadBalancer Support" %}}

```shell
export GATEWAY_HOST=$(kubectl get gateway/tcp-gateway -o jsonpath='{.status.addresses[0].value}')
```

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

Get the name of the Envoy service created by the tcp-gateway Gateway:

```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=tcp-gateway -o jsonpath='{.items[0].metadata.name}')
```

Port forward to the Envoy service:

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

```shell
export GATEWAY_HOST=localhost
```

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

You can try to use nc to test the TCP connections of envoy gateway with different ports, and you can see them succeeded:

```shell
Expand Down
Loading