Provider Presets
ingress2gateway supports multiple Gateway API implementations through provider presets. Each preset configures the appropriate gateway class and provider-specific defaults.
Available Providers
Provider |
Gateway Class |
gRPC Support |
TCP Support |
|---|---|---|---|
Istio |
|
✓ |
✓ |
Envoy Gateway |
|
✓ |
✓ |
Contour |
|
✓ |
✓ |
Kong |
|
✓ |
✓ |
NGINX Gateway Fabric |
|
✗ |
✗ |
Traefik |
|
✓ |
✓ |
GKE Gateway Controller |
|
✓ |
✗ |
Provider Details
Istio
Istio is a service mesh that includes a Gateway API implementation.
ingress2gateway convert ingress.yaml -o gateway.yaml -p istio
Configuration:
Gateway Class:
istioNamespace scope: Same namespace
Full gRPC and TCP support
Envoy Gateway
Envoy Gateway is a Kubernetes Gateway API implementation using Envoy Proxy.
ingress2gateway convert ingress.yaml -o gateway.yaml -p envoy
Configuration:
Gateway Class:
egNamespace scope: Same namespace
Full gRPC and TCP support
Contour
Contour is an Envoy-based ingress controller with Gateway API support.
ingress2gateway convert ingress.yaml -o gateway.yaml -p contour
Configuration:
Gateway Class:
contourNamespace scope: All namespaces (cross-namespace routing)
Full gRPC and TCP support
Kong
Kong Gateway provides Gateway API support through the Kong Ingress Controller.
ingress2gateway convert ingress.yaml -o gateway.yaml -p kong
Configuration:
Gateway Class:
kongNamespace scope: Same namespace
Adds
konghq.com/strip-path: trueannotation by defaultFull gRPC and TCP support
NGINX Gateway Fabric
NGINX Gateway Fabric is NGINX’s Gateway API implementation.
ingress2gateway convert ingress.yaml -o gateway.yaml -p nginx
Configuration:
Gateway Class:
nginxNamespace scope: Same namespace
No gRPC or TCP support currently
Traefik
Traefik is a cloud-native application proxy with Gateway API support.
ingress2gateway convert ingress.yaml -o gateway.yaml -p traefik
Configuration:
Gateway Class:
traefikNamespace scope: Same namespace
Full gRPC and TCP support
GKE Gateway Controller
GKE Gateway Controller is Google Cloud’s managed Gateway API implementation.
ingress2gateway convert ingress.yaml -o gateway.yaml -p gke
Configuration:
Gateway Class:
gke-l7-global-external-managedNamespace scope: Same namespace
gRPC support, no TCP support
Using Providers in Code
from ingress2gateway import (
convert_ingress_to_gateway,
apply_provider_defaults,
get_provider,
list_providers,
)
# List all providers
providers = list_providers()
for p in providers:
print(f"{p['id']}: {p['name']}")
# Get provider configuration
config = get_provider("istio")
print(f"Gateway Class: {config['gateway_class']}")
print(f"Supports gRPC: {config['supports_grpc']}")
# Apply provider defaults to converted resources
resources = convert_ingress_to_gateway(ingress)
resources["gateway"] = apply_provider_defaults(resources["gateway"], "contour")
Custom Gateway Class
If you need to use a custom gateway class not covered by the presets, you can modify the output after conversion:
resources = convert_ingress_to_gateway(ingress)
resources["gateway"]["spec"]["gatewayClassName"] = "my-custom-class"
Or edit the YAML output directly:
ingress2gateway convert ingress.yaml -q | \
sed 's/gatewayClassName: istio/gatewayClassName: my-custom-class/' > gateway.yaml