Kubernetes Gateway API
Definition
The Kubernetes Gateway API is an evolving set of resources and configurations designed to enhance the management of network traffic in Kubernetes clusters. It aims to provide a more expressive and extensible model for defining ingress and egress traffic policies, supporting advanced use cases like traffic splitting, header-based routing, and more. The Gateway API is intended to replace the Ingress API, offering improved scalability and flexibility for service networking.
Secure Settings Example
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: secure-gateway
spec:
gatewayClassName: my-gateway-class
listeners:
- name: https
protocol: HTTPS
port: 443
tls:
mode: Terminate
certificateRefs:
- kind: Secret
name: my-tls-cert
routes:
kind: HTTPRoute
selector:
matchLabels:
app: my-secure-app
Insecure Settings Example
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: insecure-gateway
spec:
gatewayClassName: my-gateway-class
listeners:
- name: http
protocol: HTTP
port: 80
tls:
mode: Passthrough
routes:
kind: HTTPRoute
selector:
matchLabels:
app: my-insecure-app