Skip to content

gen-eastwest-gateway.sh Script

The gen-eastwest-gateway.sh script is a shell utility used within Istio multicluster configurations to prepare manifests for a dedicated gateway.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-multicluster-readme.md] This gateway is specifically intended to handle east-west traffic, which prevents cross-cluster communication from overloading the default north-south Ingress gateway^[400-devops-07-monitoring-and-observability-k8s-istio-samples-multicluster-readme.md].

Execution

The script is typically executed within a pipeline that pipes its output directly to istioctl and kubectl for immediate deployment^[400-devops-07-monitoring-and-observability-k8s-istio-samples-multicluster-readme.md].

export MESH=mesh1
export CLUSTER=cluster1
export NETWORK=network1
./samples/multicluster/gen-eastwest-gateway.sh | \
    [istioctl](<./istioctl.md>) manifest generate -f - | \
    [kubectl](<./kubectl.md>) apply -f -

Configuration

The script relies on specific environment variables to configure the generated gateway correctly^[400-devops-07-monitoring-and-observability-k8s-istio-samples-multicluster-readme.md].

  • CLUSTER: Specifies the target cluster name (e.g., cluster1).
  • NETWORK: Defines the network name (e.g., network1).

These values must match the parameters used during the initial deployment of the Istio control plane^[400-devops-07-monitoring-and-observability-k8s-istio-samples-multicluster-readme.md].

Sources

^[400-devops-07-monitoring-and-observability-k8s-istio-samples-multicluster-readme.md]