A Gateway is a namespace-scoped Gateway API resource that defines traffic-entry listeners, including the gateway class, protocols, and ports. It gives cluster operators control over operational concerns such as TLS certificates while application developers configure routing separately with Route resources. section 6.7
Use the Gateway API model to divide traffic-management responsibilities:
- Infrastructure providers manage cluster-scoped GatewayClass resources and the underlying infrastructure, such as external load balancers. section 6.7
- Cluster operators configure Gateway resources, including listeners, TLS certificates, ports, and protocols. section 6.7
- Application developers attach Route resources such as HTTPRoute or TCPRoute to describe application-level traffic direction. section 6.7
Create an HTTP listener
Apply a Gateway in the default namespace with gatewayClassName set to example-class and an HTTP listener on port 80. Verify creation with kubectl; then attach an HTTPRoute through parentRefs to route requests to a backend Service. section 6.7
$ cat <<EOF | kubectl apply -f -
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: example-gateway
namespace: default
spec:
gatewayClassName: example-class
listeners:
- name: http
protocol: HTTP
port: 80
EOF
gateway.gateway.networking.k8s.io/example-gateway created
Shows a complete Gateway manifest with its namespace, GatewayClass reference, HTTP listener, and kubectl creation output. section 6.7

