Example Documentation: Gateway API
Goal
Understand Gateway API as a modern routing layer with GatewayClass, Gateway and HTTPRoute.
What Is Done
The normal app lives under manifests/. Gateway API resources live separately under gateway-api/ because they require CRDs and a Gateway Controller.
Typical Commands
kubectl apply -f manifests/
kubectl kustomize gateway-api/
kubectl apply -f gateway-api/
kubectl get gatewayclass
kubectl get gateway,httproute -n gateway-lab
Validate Success
- Workload and Service exist in namespace
gateway-lab. HTTPRoutepoints to Servicegateway-web.GatewayClass.spec.controllerNamematches the installed controller.
Common Mistakes
- Gateway API CRDs are not installed.
- Placeholder controllerName is not adjusted.
- Gateway and HTTPRoute are expected to work without a controller.