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 has built-in Gateway API support with no additional controller installation needed.
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
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
istio- Istio Gatewaynginx- NGINX Gateway (if NGINX Gateway Fabric is installed)
On GKE, verify available GatewayClasses with:
kubectl get gatewayclassAnnotations for the Gateway resource.Use Cases:Example - Static IP:
- GCP certificate maps for managed certificates
- Cloud-specific load balancer configuration
- Custom metadata
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)
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.
