EKS Cluster: Part 13 – Gateway API (Part 2)

Series of blog posts show progress of updating/adding to EKS Cluster, this post covers adding Gateway API. See part 1 below:

Gateway API:

  • Kubernetes positions Gateway API as the next generation of service networking for L4/L7 routing.

Flow & Steps Forward:

  • We’ll use the stable Envoy Gateway v1.9.2 Helm chart.
    • Its chart supplies compatible Gateway API and Envoy CRDs.
  • No ALB/NLB hourly charges.
  • No new Terraform, IAM, or Pod Identity initially.
  • Managed completely through Argo CD.
  • Teaches the portable Gateway API objects.
  • Test locally through kubectl port-forward.
  • Later, repeat the exercise with AWS Load Balancer Controller to create real ALBs/NLBs.

Implementation Phases:

  • Start with Envoy Gateway using an internal ClusterIP:
  • Install Envoy Gateway and Gateway API CRDs.
  • Update the lab-platform and workload AppProjects.
  • Deploy a small ARM64-compatible demonstration application.
  • Add GatewayClass, Gateway, and HTTPRoute.
  • Port-forward Envoy and test routing with curl.
  • Test path matching, redirects, header matching, and traffic splitting.
  • Optionally add AWS Load Balancer Controller for public ALB/NLB routing.
PhasePurposeResources
Phase 1Install the controller and CRDsEnvoy Gateway Helm chart
Phase 2A Prepare platform ownershipAppProject, Application, Namespace
Phase 2BSelect and configure EnvoyGatewayClass, EnvoyProxy
Phase 2CCreate the listenerGateway
Phase 3ADeploy the test applicationDeployment, Service
Phase 3BConnect traffic to the applicationHTTPRoute
Phase 4Test routingPort-forward, curl, status checks

Planned Gitops Structure:

applications/lab/
├── platform/
│ ├── envoy-gateway.yaml
│ └── envoy-gateway-config.yaml
└── workloads/
└── gateway-demo.yaml
apps/
├── envoy-gateway/
│ └── values.yaml
├── envoy-gateway-config/
│ ├── namespace.yaml
│ ├── gatewayclass.yaml
│ ├── envoy-proxy.yaml
│ └── gateway.yaml
└── gateway-demo/
├── deployment.yaml
├── service.yaml
└── httproute.yaml
ResourceResponsibility
GatewayClassSelects Envoy Gateway as the implementation
EnvoyProxyForces the generated Envoy service to ClusterIP
GatewayDefines the HTTP listener
HTTPRouteRoutes requests to the application
ServiceProvides the route backend
DeploymentRuns the demonstration application

Phase 3a: Deploy the test application for Deployment, Service

  • Deploys the workload independently of Gateway routing. This checkpoint proves:
===========
Deployment → Pod → Service
===========
===========
applications/lab/workloads/
└── gateway-demo.yaml
apps/gateway-demo/
├── deployment.yaml
└── service.yaml
===========

lab-platform.yaml:

===========
- namespace: gateway-demo
server: https://kubernetes.default.svc
===========

applications/lab/workloads/gateway-demo.yaml

apps/gateway-demo/deployment.yaml

apps/gateway-demo/service.yaml

  • Create backend service
    • Later, the Gateway will receive traffic on port 80 and the HTTPRoute will forward it to Service port 8080.

Service port 8080
↓
container port 8080
↓
whoami process

Phase 3b: Connect traffic to the application for HTTP-Route

  • Phase 3B adds the final connection:
    • Client
      • Gateway listener
      • HTTPRoute
      • gateway-demo Service
      • whoami Pod

lab-platform.yaml:

  • This permission allows the workload Application to manage its route, but it still cannot modify:
    • GatewayClass
    • EnvoyProxy
    • Gateway
  • That preserves the platform/workload ownership boundary.
===========
# Application teams may attach HTTP routes to permitted Gateways.
- group: gateway.networking.k8s.io
kind: HTTPRoute
===========

apps/gateway-demo/httproute.yaml

===========
parentRefs:
- name: gateway-demo
sectionName: http
===========
  • This section means the request must use gateway-demo.local as its HTTP hostname.
===========
hostnames:
- gateway-demo.local
===========
  • And sends the request too:
===========
Service/gateway-demo:8080
===========

applications/lab/projects/lab-workloads.yaml

===========
spec:
destinations:
- namespace: gateway-demo
server: https://kubernetes.default.svc
clusterResourceWhitelist:
- group: ""
kind: Namespace
namespaceResourceWhitelist:
- group: ""
kind: Service
- group: gateway.networking.k8s.io
kind: HTTPRoute
===========

Phase 4: Test Routing for Port-Forward, curl, status checks

  • End-to-End verification
Envoy Gateway controller
↓
GatewayClass
↓
Gateway + internal Envoy proxy
↓
HTTPRoute
↓
Service
↓
whoami Pod
  • Proves all layers work
Applications Synced/Healthy
GatewayClass Accepted True
Gateway Programmed True
Attached routes 1
HTTPRoute Accepted True
HTTPRoute ResolvedRefs True
Backend EndpointSlice ready true
Envoy Service ClusterIP
Correct hostname HTTP 200
Wrong hostname HTTP 404

Commands to try/test:

  • After your git commands & terraform apply commands – the following commands can be attempted
===========
kubectl patch application envoy-gateway \
-n argocd \
--type merge \
-p '{"operation":null}'
===========
kubectl annotate application monitoring-root \
-n argocd \
argocd.argoproj.io/refresh=hard \
--overwrite
kubectl annotate application envoy-gateway \
-n argocd \
argocd.argoproj.io/refresh=hard \
--overwrite
===========

Can check k9s or here our a few commands to also try

===========
kubectl get deployment,pods,service \
-n gateway-demo \
-o wide
===========

Confirm endpoints can demonstrate a workload

Test traffic through Envoy

===========
kubectl get services \
-n envoy-gateway-system \
-l gateway.envoyproxy.io/owning-gateway-name=gateway-demo
===========
ENVOY_SERVICE="$(
kubectl get services \
-n envoy-gateway-system \
-l gateway.envoyproxy.io/owning-gateway-name=gateway-demo \
-o jsonpath='{.items[0].metadata.name}'
)"
echo "$ENVOY_SERVICE"
===========
kubectl -n envoy-gateway-system port-forward svc/envoy-gateway-demo-gateway-demo-c72b0946 8080:80
===========
curl --include \
--resolve gateway-demo.local:8080:127.0.0.1 \
http://gateway-demo.local:8080/
===========
  • You should see
    • HTTP/1.1 200 OK
===========
curl
→ local port-forward
→ Envoy ClusterIP Service
→ Gateway listener
→ HTTPRoute
→ gateway-demo Service
→ gateway-demo pod
===========

One thought on “EKS Cluster: Part 13 – Gateway API (Part 2)”

Leave a Reply