Gateway API vs Ingress: Gateway API offers more flexibility and features compared to traditional Ingress resources. It supports advanced routing, traffic splitting, and is designed for multi-tenancy. GKE and AKS can install and manage the Gateway API CRDs for you.
Core Configuration
Enable Gateway API for routing traffic to web and OAuth services.When Enabled:
- Creates or references a Gateway resource
- Configures HTTPRoutes for web and OAuth services (when their respective
gateway.enabledis true) - Requires Gateway API CRDs installed in the cluster
- Cluster must have Gateway API CRDs installed
- On GKE, enable with:
gcloud container clusters update CLUSTER --gateway-api=standard - On AKS, enable with:
az aks update -g RESOURCE_GROUP -n CLUSTER --enable-gateway-api, plus one Gateway API implementation (seegateway.gatewayClassName)
Create a new Gateway resource or reference an existing one.When true:Example - Reference Existing Gateway:
- Chart creates a new Gateway resource
- Gateway name defaults to
<release-name>-gatewayor can be set viagateway.name - Gateway is created in the same namespace as the Helm release
- Chart references an existing Gateway by name
- Must specify
gateway.nameand optionallygateway.namespace - Useful for shared Gateway across multiple applications
Name of the Gateway resource.Default Behavior:
- When
create: trueand empty: Defaults to<release-name>-gateway - When
create: false: Must be specified (name of existing Gateway)
Namespace of the Gateway resource (only used when
create: false).Purpose: Allows HTTPRoutes to reference a Gateway in a different namespace.Default Behavior: If empty when create: false, assumes Gateway is in the same namespace as the Helm release.Example:Gateway controller class name.Required: Yes (when
gateway.enabled: true)GKE Built-in Classes:gke-l7-global-external-managed- Global external Application Load Balancergke-l7-regional-external-managed- Regional external Application Load Balancergke-l7-rilb- Regional internal Application Load Balancer
approuting-istio- App Routing add-on with Gateway API. Enable withaz aks update -g RESOURCE_GROUP -n CLUSTER --enable-gateway-api --enable-app-routing-istio. Runs an Envoy proxy in the cluster behind an Azure Load Balancer.azure-alb-external- Application Gateway for Containers, installed through the ALB Controller. A managed layer 7 load balancer that runs outside the cluster.
istio- Istio Gatewaynginx- NGINX Gateway (if NGINX Gateway Fabric is installed)
Verify the GatewayClasses available in your cluster with:
kubectl get gatewayclassAnnotations for the Gateway resource.Use Cases:Example - Static IP:Example - Application Gateway for Containers:
- GCP certificate maps for managed certificates
- Cloud-specific load balancer configuration
- Custom metadata
Labels and annotations for the resources that the Gateway API implementation creates for this Gateway, such as its load balancer Service. Rendered as the Gateway’s
spec.infrastructure.Only implementations that create in-cluster resources for each Gateway use this field, for example approuting-istio. Application Gateway for Containers does not.Example - Internal Azure Load Balancer (approuting-istio):Listeners Configuration
List of Gateway listeners (ports and protocols).Purpose: Defines which ports the Gateway listens on and how traffic is handled.Default Configuration:Each listener must specify:
name- Unique listener nameprotocol- HTTP, HTTPS, TCP, or TLSport- Port number (80, 443, etc.)
hostname- Hostname filter for this listenertls- TLS configuration (for HTTPS/TLS protocols)
The chart automatically configures
allowedRoutes.namespaces.from: Same to restrict HTTPRoutes to the same namespace.HTTP Listener Example
HTTPS Listener with Kubernetes TLS Secret
HTTPS Listener with GCP Managed Certificate
When using GCP-managed certificates via
networking.gke.io/certmap, the listener doesn’t need tls.certificateRefs. The certificate map is applied at the Gateway level via annotations.HTTP and HTTPS Listeners (Dual-Stack)
HTTPS Redirect
Redirect plain HTTP requests to HTTPS.When Enabled:
- The web and OAuth HTTPRoutes attach only to the listener named in
gateway.httpsRedirect.httpsListener - An extra HTTPRoute on the listener named in
gateway.httpsRedirect.httpListeneranswers every request for the platform hostnames with a301redirect tohttps - Both listeners must exist on the Gateway. When the chart creates the Gateway, the install fails with a clear error if either name is missing from
gateway.listeners
Health Checks
On GKE, the chart also createsHealthCheckPolicy resources (networking.gke.io/v1) that point the load balancer at /health on the web and OAuth services. They are rendered when the cluster serves that API or when gateway.gatewayClassName starts with gke-. Other implementations, including approuting-istio and Application Gateway for Containers, health-check the pods through their readiness probe, so no extra resource is needed.
When you render the chart with
helm template for a GKE cluster and reference an external Gateway without gateway.gatewayClassName, pass --api-versions networking.gke.io/v1/HealthCheckPolicy so the HealthCheckPolicy resources are included.Complete Examples
Basic HTTP Gateway (Development)
Production HTTPS Gateway with Managed Certificate
Shared Gateway Across Multiple Applications
Install infrastructure Gateway once:OAuth with Dedicated Hostname
When using a dedicated hostname for OAuth (recommended for non-NGINX ingress controllers):Troubleshooting
Gateway Not Found
Error: HTTPRoute showsGateway not found in status
Solution: Verify Gateway exists and is in the correct namespace:
create: false, ensure the referenced Gateway exists:
No GatewayClass Available
Error:no matches for kind "Gateway" or GatewayClass not found
Solution: Enable Gateway API on your cluster:
GKE:
HTTPRoute Not Attached to Gateway
Error: HTTPRoute showsAccepted: False in status
Possible causes:
- Gateway namespace mismatch
- Listener protocol mismatch
- Hostname conflicts
Status.Parents section for detailed error messages.
