Tier1 Gateway
Tier1Gateway
configures a workload to act as a gateway that
distributes traffic across one or more ingress gateways in other
clusters.
NOTE: Tier1 gateways cannot be used to route traffic to the same cluster. A cluster with tier1 gateway cannot have any other gateways or workloads.
The following example declares a tier1 gateway running on pods with
app: gateway
labels in the ns1
namespace. The gateway exposes
host movieinfo.com
on port 8443. Traffic for this host is TLS
terminated and forwarded over Istio mutual TLS to the ingress gateways
hosting movieinfo.com
host on clusters c3
and c4
.
apiVersion: gateway.tsb.tetrate.io/v2
kind: Tier1Gateway
metadata:
name: tier1
group: g1
workspace: w1
tenant: mycompany
organization: myorg
spec:
workloadSelector:
namespace: ns1
labels:
app: gateway
externalServers:
- name: movieinfo
hostname: movieinfo.com # TLS termination and Istio mTLS to upstream
tls:
mode: SIMPLE
secretName: movieinfo-secrets
clusters:
- name: c3 # the target gateway IPs will be automatically determined
weight: 90
- name: c4
weight: 10
Tier1 gateways can also be used to forward mesh internal traffic
for Gateway hosts from one cluster to another. This form of
forwarding will work only if the two clusters cannot reach each
other directly (e.g., they are on different VPCs that are not
peered). The following example declares a tier1 gateway running on
pods with app: gateway
labels in the ns1
namespace. The gateway
exposes hosts movieinfo.com
and bookinfo.com
within the
mesh. Traffic to movieinfo.com
is load balanced across all
clusters on vpc-02
, while traffic to bookinfo.com
is load
balanced across ingress gateways exposing bookinfo.com
on any
cluster. Traffic from the source (sidecars) is expected to arrive
on the tier1 gateway over Istio mTLS.
apiVersion: gateway.tsb.tetrate.io/v2
kind: Tier1Gateway
metadata:
name: tier1
group: g1
workspace: w1
tenant: mycompany
organization: myorg
spec:
workloadSelector:
namespace: ns1
labels:
app: gateway
internalServers: # forwarding gateway
- name: movieinfo
hostname: movieinfo.com
clusters:
- network: vpc-02 # the target gateway IPs will be automatically determined
- name: bookinfo
hostname: bookinfo.com # route to any ingress gateway exposing bookinfo.com
NOTE: If two clusters have direct connectivity, declaring a tier1 internal server will have no effect.
ClusterDestination
Field | Description | Validation Rule |
name | string | – |
labels | map<string, string> | |
network | string | – |
weight | uint32 | – |
Tier1ExternalServer
Tier1ExternalServer describes the properties of a server exposed outside the mesh. Traffic arriving at a Tier1 external server is usually TLS terminated and then forwarded over Istio mTLS to all the lower tier2 clusters.
Field | Description | Validation Rule |
name | string | string = { |
port | uint32 | uint32 = { |
hostname | string | string = { |
tls | tetrateio.api.tsb.gateway.v2.ServerTLSSettings | message = { |
clusters | List of tetrateio.api.tsb.gateway.v2.ClusterDestination | – |
Tier1Gateway
Tier1Gateway
configures a workload to act as a tier1 gateway into the mesh.
Field | Description | Validation Rule |
workloadSelector | tetrateio.api.tsb.types.v2.WorkloadSelector | message = { |
externalServers | List of tetrateio.api.tsb.gateway.v2.Tier1ExternalServer | – |
internalServers | List of tetrateio.api.tsb.gateway.v2.Tier1InternalServer | – |
Tier1InternalServer
Tier1InternalServer describes the properties of a server exposed within the mesh, for the purposes of forwarding traffic between two clusters that cannot otherwise directly reach each other. Traffic arriving at a Tier1 internal server should be over Istio mTLS. After TLS termination and metrics extraction, it is forwarded to tier2 clusters based on the selection criteria.
Field | Description | Validation Rule |
name | string | string = { |
hostname | string | string = { |
clusters | List of tetrateio.api.tsb.gateway.v2.ClusterDestination | – |