Resolving multi-cluster issues

This section explains common Cloud Service Mesh problems and how to resolve them. If you need additional assistance, see Getting support.

Cross-cluster timeouts, high latency, or unexpected cross-cluster traffic

Workloads in a fleet with multiple clusters can experience timeouts or high tail latency when cross-cluster endpoint discovery is active without Pod-to-Pod connectivity.

Symptoms

You might observe the following symptoms:

  • Requests fail after a delay with a timeout or an HTTP 503 or 504 error.
  • Tail latency spikes when retries hit unreachable remote Pods before reaching a local Pod or failing.
  • Issues begin after you register another cluster to the fleet or enable automatic management on a cluster.

Causes

This issue happens when cross-cluster endpoint discovery is enabled on multiple clusters in a fleet, but network connectivity or firewall rules between their Pods are missing:

  • When multiple clusters in the same fleet have multicluster_mode: connected in the asm-options ConfigMap, traffic is load balanced between them. For more information, see Configure endpoint discovery.
  • Cloud Service Mesh doesn't create Virtual Private Cloud (VPC) routes or firewall rules between clusters. Requests routed to local Pods succeed, while requests routed to remote cluster Pods wait until the connection timeout expires.

Diagnose the issue

Check whether two or more clusters in your fleet have multicluster_mode set to connected. Run gcloud container fleet memberships list to list fleet clusters, and then check each cluster:

kubectl get configmap asm-options -n istio-system \
    -o jsonpath='{.data.multicluster_mode}{"\n"}'

Resolve the issue

Depending on whether you want traffic to flow between clusters, do one of the following:

Missing secrets

This section only applies to the in-cluster control plane and the managed control plane with the Istiod implementation.

Cloud Service Mesh relies on a kubeconfig file embedded in the Kubernetes secret for proper remote endpoint discovery. Without the secrets, users will always see requests hit pods in the local cluster during cross-cluster load balancing.

Verify the secret has been created by running the following command in every cluster:

kubectl get secret istio-remote-secret-CLUSTER_NAME_i -n istio-system

Verify the expected output:

NAME                                   TYPE     DATA   AGE
istio-remote-secret-CLUSTER_NAME_i   Opaque   1      44s

To recover from this, delete all the remote secrets and re-run the create-mesh command.

Unreachable API server

This section only applies to in-cluster control plane and managed (istiod implementation).

The control plane of Cloud Service Mesh needs to reach the API server of the remote cluster. The following situations can cause the remote cluster to become unreachable:

Given an unreachable API server, Istiod will output error messages in the log. Users will always see requests hit the local pod during cross-cluster load balancing.

In the Logs Explorer interface, set the query resource.type to istio_control_plane.

Check to see if there are any invalid secret errors.

To recover from this problem, fix the underlying API server reachability issue. Next, delete all the remote secrets in every cluster and re-run the create-mesh command.