diff --git a/content/docs/tasks/multicluster/gateways/index.md b/content/docs/tasks/multicluster/gateways/index.md index e452e5d0fa..8e51af5d31 100644 --- a/content/docs/tasks/multicluster/gateways/index.md +++ b/content/docs/tasks/multicluster/gateways/index.md @@ -139,14 +139,61 @@ running in a second cluster. ## Send remote cluster traffic using egress gateway -If you want to route traffic from `cluster1` via a dedicated -egress gateway, instead of directly from the sidecars, +If you want to route traffic from `cluster1` via a dedicated egress gateway, instead of directly from the sidecars, use the following service entry for `httpbin.bar` instead of the one in the previous section. {{< tip >}} The egress gateway used in this configuration cannot also be used for other, non inter-cluster, egress traffic. {{< /tip >}} +If `$CLUSTER2_GW_ADDR` is an IP address, use the `$CLUSTER2_GW_ADDR - IP address` option. If `$CLUSTER2_GW_ADDR` is a hostname, use the `$CLUSTER2_GW_ADDR - hostname` option. + +{{< tabset cookie-name="profile" >}} + +{{< tab name="$CLUSTER2_GW_ADDR - IP address" cookie-value="option1" >}} +* Export the `cluster1` egress gateway address: + +{{< text bash >}} +$ export CLUSTER1_EGW_ADDR=$(kubectl get --context=$CTX_CLUSTER1 svc --selector=app=istio-egressgateway \ + -n istio-system -o yaml -o jsonpath='{.items[0].spec.clusterIP}') +{{< /text >}} + +* Apply the httpbin-bar service entry: + +{{< text bash >}} +$ kubectl apply --context=$CTX_CLUSTER1 -n foo -f - <}} + +{{< /tab >}} + +{{< tab name="$CLUSTER2_GW_ADDR - hostname" cookie-value="option2" >}} +If the `${CLUSTER2_GW_ADDR}` is a hostname, you can use `resolution: DNS` for the endpoint resolution: + {{< text bash >}} $ kubectl apply --context=$CTX_CLUSTER1 -n foo -f - <}} +{{< /tab >}} + +{{< /tabset >}} + ## Version-aware routing to remote services If the remote service has multiple versions, you can add