Route across clusters with east-west gateways
Enable cross-cluster routing between apps in a multicluster Gloo Mesh Enterprise setup.
If you have a multicluster Gloo Mesh Enterprise setup, deploy an Istio east-west gateway into each workload cluster. An east-west gateway lets services in one mesh communicate with services in another.
Before you begin
Save the kubeconfig contexts for your clusters. The examples in this guide assume one management cluster, and two workload clusters that run Istio service meshes.
If you have not already, set environment variables for the Solo distribution of Istio that you want to install. You can find these values in the Istio images built by Solo.io support article.
Get the revision that you used for your installation. Typically, this is
main
for a Helm installation, orgloo
for a Gloo Operator installation.
Deploy east-west gateways in each workload cluster
Prepare a Helm values file for the Istio east-west gateway. This sample command downloads an example file,
eastwest-gateway.yaml
, and updates the environment variables with the values that you previously set. You can further edit the file to provide your own details for production-level settings.Create an east-west gateway in each cluster.
Verify that the east-west gateway pods are running and the load balancer service is assigned an external address.
Example output:
AWS clusters only: For the Elastic Load Balancer (ELB) instance that is automatically created for you to back the east-west gateway service, verify that the health check shows a healthy state. Gloo Mesh configures the east-west gateway to listen on HTTPS port 15443. However, when the ELB is created, the first port that is defined in the Kubernetes service manifest is used to perform the health check. This port might be different from the port that Gloo Mesh configures. For your ELB health check to pass, you might need to configure the load balancer to run the health check on port 15443.
Set up routing across clusters
After you create east-west gateways in each workload cluster, you can then set up cross-cluster routing to your in-mesh apps. The steps in this section use the Bookinfo sample app as an example.
Create a Gloo root trust policy to ensure that services in
cluster1
securely communicate with thereviews
service incluster2
. The root trust policy sets up the domain and certificates to establish a shared trust model across multiple clusters in your service mesh.Restart istiod and the sample apps that you deployed earlier to apply the updated certificates.
Create a virtual destination resource and define a unique hostname that in-mesh gateways can use to send requests to the
reviews
app. This virtual destination is configured to listen for incoming traffic on the internal-only, arbitrary hostnamereviews.mesh.internal.com:8080
.Create a route table that defines how east-west requests within your mesh are routed from the
productpage
service to thereviews-vd
virtual destination. When you apply this route table, requests fromproductpage
to/reviews
now route to one of the three reviews versions across clusters. The east-west gateway in your mesh does the work of taking requests made to thereviews.bookinfo.svc.cluster.local
hostname and routing them to thereviews.mesh.internal.com
virtual destination hostname that you specified in the previous step.In your terminal, open the Bookinfo product page from your local host.
- Enable port-forwarding on the product page deployment.
- Open your browser to http://localhost:9080/productpage?u=normal.
- Enable port-forwarding on the product page deployment.
Refresh the page a few times again. Now, the red stars for
reviews-v3
are shown in the book reviews.Figure: Bookinfo product page UI with red star reviews Figure: Bookinfo product page UI with red star reviews Bookinfo services in
cluster1
are now successfully accessing the Bookinfo services incluster2
!
Next
- Review your options for exposing apps in your service mesh with an ingress gateway.
- If you haven’t already, install Gloo Mesh Enterprise so that Gloo Mesh Enterprise can manage your Istio resources. You don’t need to directly configure any Istio resources going forward.
- Review how Gloo Mesh custom resources are automatically translated into Istio resources.
- Apply Gloo policies to manage the security and resiliency of your service mesh environment.
- Launch the Gloo UI to review the Istio insights that were captured for your service mesh setup. Gloo Mesh Enterprise comes with an insights engine that automatically analyzes your Istio setups for health issues. These issues are displayed in the UI along with recommendations to harden your Istio setups. The insights give you a checklist to address issues that might otherwise be hard to detect across your environment. For more information, see Insights.
- Monitor and observe your Istio environment with Gloo Mesh Enterprise’s built-in telemetry tools.
- When it’s time to upgrade your service mesh, you can perform a safe in-place upgrade by using the Gloo Operator or Helm.