I already knew about Kubernetes Ingress and had investigated gateways for single sign-on in legacy web apps. What brought me back was wanting to cache language model answers. Following AI gateways led me to Higress, which uses Envoy to handle traffic. I wanted to understand something more basic: if Envoy is already a proxy, why does Envoy Gateway exist? If I choose Traefik or Gloo instead, who actually forwards the request?
Questions about the basics
The diagram shows two ingress deployments for the same shop. Follow a browser order along the solid lines, then follow the dashed lines to see who activates the routing configuration. Pick one ingress path at a time.12345
flowchart TB
ing["Ingress 规则"]
route["Gateway API<br/>Gateway 与 HTTPRoute"]
client["浏览器 · 访问 /orders/42"]
subgraph traefikPath["入口方案 A · Traefik"]
traefik["Traefik Proxy<br/>读取规则,也转发请求"]
end
subgraph envoyPath["入口方案 B · 基于 Envoy"]
ctrl["控制器(二选一)<br/>Envoy Gateway 或 Gloo Gateway"]
edge["Envoy Proxy<br/>转发入口请求"]
ctrl -.->|下发配置| edge
end
ing -.-> traefik
route -.-> traefik
route -.-> ctrl
client --> traefik
client --> edge
subgraph orders["订单 Pod"]
orderProxy["Envoy sidecar"]
orderApp["订单应用"]
orderProxy -->|下单| orderApp
orderApp -->|查库存| orderProxy
end
subgraph inventory["库存 Pod"]
stockProxy["Envoy sidecar"]
stockApp["库存应用"]
stockProxy --> stockApp
end
traefik --> orderProxy
edge --> orderProxy
orderProxy -->|调用库存服务| stockProxy
Both backend Pods in the diagram have an Istio sidecar. The two arrows in the orders Pod are two requests. The browser’s order enters the orders app through the sidecar, then the app’s inventory lookup leaves through the same sidecar. With only an ingress gateway deployed, the proxy can send the order directly to the application.53
Is a gateway just a reverse proxy with more features?
A reverse proxy that only forwards requests can still serve as a gateway. When the browser visits shop.example.com/orders/42, the ingress program accepts the connection on behalf of the orders service, forwards the request, and returns the response. “Reverse proxy” describes how it handles requests. “Ingress gateway” describes its role in the shop. The HTTP specification also calls a gateway a reverse proxy. Authentication, rate limiting, and logging can all be added at this entry point.63
After I write an Ingress rule, who forwards the request?
Ingress is a Kubernetes resource describing entry rules. For example, route /orders on this domain to the orders Service. A Service gives backend instances a stable service name. An Ingress Controller must watch for changes and configure the proxy before the rule takes effect. With Traefik, Traefik reads the saved rule, then accepts and forwards the customer connection itself.1
Is Traefik an implementation of Envoy?
Traefik Proxy and Envoy Proxy are independent proxies, both capable of fronting the shop. With Traefik, its own proxy handles the order request. Saying Traefik implements Kubernetes Ingress means it understands and applies those rules. Envoy is separate software that can also forward traffic.17
Why have Envoy Gateway when Envoy Proxy already exists?
Envoy Proxy can serve as an ingress gateway by itself. To add a returns service, someone or something needs to enter /returns and its backend in Envoy’s configuration. If the orders team wants to declare this route in Kubernetes and have a controller keep Envoy updated, it can use Envoy Gateway. It reads entry and route resources defined by the Kubernetes Gateway API, translates them into Envoy configuration, and distributes it. When a customer visits /returns, Envoy Proxy still receives and forwards the request.738
Which traffic does Envoy handle at ingress versus as a sidecar?
At ingress, Envoy sits at the shop’s shared entry point accepting browser requests. A sidecar is an auxiliary container deployed with an application in the same Pod, a group of containers deployed together in Kubernetes. In Istio sidecar mode, an orders-to-inventory call may pass through Envoy in the orders Pod and then Envoy in the inventory Pod. Infrastructure managing service-to-service communication this way is called a service mesh. The following gateway comparison concerns the browser-to-shop ingress path.57
How does one order route travel from declaration to proxy?
Suppose the platform team has created a shared entry named public. The orders team only wants /orders routed to the orders service. With Gateway API, GatewayClass specifies the controller managing that class of gateways. Gateway defines the actual listener’s port, protocol, and permitted routes. HTTPRoute specifies which requests go where. The platform team can own the first two and the orders team its own route. This same-namespace example assumes the entry allows the route to attach and the backend Service exposes port 8080.83
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: orders
spec:
parentRefs:
- name: public
hostnames:
- shop.example.com
rules:
- matches:
- path:
type: PathPrefix
value: /orders
backendRefs:
- name: orders
port: 8080
What is this route called in Kubernetes and where is it stored? The YAML above is a manifest. Gateway API registers the HTTPRoute type using a custom resource definition (CRD). Once submitted, this particular orders route is a custom resource (CR). Ingress and Service are built-in Kubernetes resource types. In a standard cluster the API server persists the objects in etcd, the control plane’s distributed key-value store.98
The gateway controller watches route and Service changes through the Kubernetes API and supplies forwarding rules to the proxy. This is the control plane. On each browser request, the proxy matches host and path against the received configuration, picks a backend instance, and sends the order response back. This is the data plane.3 Once a route is active, trace actual forwarding with Envoy’s admin interface and statistics. In a multi-proxy deployment, identify the proxy layer you’re observing first.10
How do three open-source gateways handle the same HTTPRoute?
| Implementation | Who reads the rule and who forwards the order? | What influences the choice in an existing system? |
|---|---|---|
| Envoy Gateway | The Envoy Gateway controller translates Kubernetes resources into configuration for Envoy Proxy, which receives the requests. | If Gateway API and Envoy are already selected, the platform team can trace problems from entry to route to backend. How a cloud load balancer delivers traffic to the proxy is also part of deployment.3 |
| Traefik Proxy | Enable kubernetesGateway and Traefik reads Gateway API resources through that provider, then forwards requests itself. A provider is its interface for discovering configuration in an environment. | Teams with Kubernetes Ingress or Docker service labels can keep their providers and add Gateway API for new services. Inventory existing Traefik-specific rules before estimating migration work.211 |
| Gloo Gateway | The Gloo control plane reads routes and policies and configures the Envoy that forwards traffic. Alongside standard routes it provides extensions such as RouteOption. | Teams shipping request or response transformations with their routes can test the open-source tutorials feature by feature. Inventory these extensions before ordinary path matches during migration.412 |
Envoy Gateway and Gloo both use Envoy. Their differences are chiefly in configuration. In the AWS example a network load balancer sends traffic to Envoy in EKS (AWS managed Kubernetes), and gateway routes distribute it to backends. Solo.io’s GitOps example uses Argo CD to publish routes from Git into the cluster. Submitting the same manifest directly with kubectl apply -f orders.yaml also lets Gloo read the route through the Kubernetes API and configure Envoy to forward requests.34
Where does Traefik get route configuration? Luga describes providers as “Traefik 与各种云原生平台之间的集成和连接器” (integrations and connectors between Traefik and cloud-native platforms). His example uses Traefik v3.0’s Kubernetes Ingress Provider to show how providers react to resource changes. The adaptation below follows v3.0.0’s Provide method, keeping only events, configuration, and publication, omitting logging, retries, and throttling.1314
events, err := k8sClient.WatchAll(p.Namespaces, ctxPool.Done())
if err != nil {
return err
}
for {
select {
case <-ctxPool.Done():
return nil
case <-events:
config := p.loadConfigurationFromIngresses(ctxLog, k8sClient)
hash, err := hashstructure.Hash(config, nil)
if err != nil || hash == p.lastConfiguration.Get() {
continue
}
p.lastConfiguration.Set(hash)
configurationChan <- dynamic.Message{ProviderName: "kubernetes", Configuration: config}
}
}
Suppose the team adds /returns to the orders Ingress with a returns service backend. WatchAll establishes a watch and case <-events receives a change notification. That only wakes the provider. loadConfigurationFromIngresses rereads hosts, paths, and backends from selected Ingresses and builds route and service configuration. If the result matches the previous configuration, continue skips publication. If it changed, the last line sends the full configuration into Traefik’s configuration channel. The next visit to /returns follows the active new route. The HTTPRoute example above uses a different provider, kubernetesGateway.142
If another orders service runs on Docker, container labels can declare routes for the Docker Provider to read. A team maintaining both environments should first ask who owns the routing configuration and where it lives. Check the provider docs for the specific open-source Traefik Proxy version. Demos and trials on the vendor comparison page concern Traefik Hub.1115
Gloo materials also use the name kgateway. The 2024 hands-on tutorial used open-source Gloo Gateway. By March 2025 the authors had explained how the open-source project was donated to CNCF under the name kgateway. Match configuration fields and extension resources to the tutorial’s version when reproducing it.412
What should I verify first before switching gateways?
First, release a new version. Suppose orders-v1 and orders-v2 Services in the same namespace both expose port 8080. Keep the host and path from the earlier example and replace only backendRefs in spec.rules[0]. Their weights are 9:1, so the new version should receive about a tenth of matching traffic.84
backendRefs:
- name: orders-v1
port: 8080
weight: 9
- name: orders-v2
port: 8080
weight: 1
Run the following command in the route’s namespace and find the public entry under Status → Parents. First confirm the condition’s observedGeneration matches the current resource’s metadata.generation. If Accepted=True but ResolvedRefs=False, the gateway accepted the route but some references, such as its backend, still have problems. Start with the condition’s reason and message. Once both are True, make repeated requests through the gateway and compare backend access logs to verify the split.8
kubectl describe httproute orders
Second, migrate a transformation rule. Suppose the orders service needs an HTTP header identifying the request source. In this adaptation of Solo.io’s example, add filters to the same rule alongside backendRefs. An order sent through the gateway should reach the backend with X-Order-Source: storefront. RequestHeaderModifier is a Gateway API filter.48
filters:
- type: RequestHeaderModifier
requestHeaderModifier:
set:
- name: X-Order-Source
value: storefront
If the old gateway also rewrites response bodies from a template, changing a request header won’t test that. Solo.io describes extensions including Gloo’s RouteOption. For a migration, I’d send the same order response through both gateways and compare the fields the client actually receives. Traefik v3.3’s own Gateway API docs bound its commitment: “It fully supports all HTTP core and some extended features”. For body rewrites, check the target version’s ability to express the specific rule.42
For a shared entry to several Kubernetes services where Envoy is wanted, I’d evaluate Envoy Gateway first. If routes already use Traefik on Docker and Kubernetes, I’d first try the existing proxy’s Gateway API provider. To preserve Gloo transformations, I’d first follow an open-source example through deployment and rollback to see which policies must be maintained with the application. Counting tokens or deciding whether to reuse a model answer requires understanding model requests and responses. That’s the question I compare in another article on AI gateways.
References
Footnotes
-
Traefik Labs. (n.d.). Traefik & Kubernetes (v3.3). Traefik Proxy documentation. Kubernetes Ingress Provider 对入口控制器职责的说明。 ↩ ↩2 ↩3
-
Traefik Labs. (n.d.). Traefik & Kubernetes with Gateway API (v3.3). Traefik Proxy documentation. 开篇第 3 段的支持范围与 Routing Configuration。 ↩ ↩2 ↩3 ↩4
-
AWS Team. (2023, December 25). 下一代的 k8s L7 流量入口 – 初探 K8s API 网关 Envoy Gateway. 亚马逊 AWS 官方博客. “什么是 Envoy Gateway”与“Envoy Gateway 和 EKS 集成”。另见 Envoy Gateway 项目仓库。 ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8
-
Barton, J. (2024, September 25). Hands-On with the Kubernetes Gateway API and Envoy Proxy: A Tutorial with GitOps and Gloo Gateway. Solo.io. 开源版部署、RouteOption 变换及按权重发布。教程对应的开源项目见 solo-io/gloo。 ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
-
Istio Authors. (n.d.). Architecture. Istio documentation. Envoy 的 sidecar 部署与控制面。 ↩ ↩2 ↩3
-
Fielding, R., Nottingham, M., & Reschke, J. (2022, June). HTTP Semantics (RFC 9110). RFC Editor. § 3.7 Intermediaries。 ↩
-
Envoy Project Authors. (n.d.). What is Envoy. Envoy documentation. “Out of process architecture”与“Front/edge proxy support”。中文入门可参考《深入架构原理与实践》的 Envoy 章节。源码可从 Envoy 的 GitHub 组织页进入。 ↩ ↩2 ↩3
-
Utt, S., Young, N., & Scott, R. (2023, October 31). Gateway API v1.0: GA Release. Kubernetes Blog. Gateway API 项目主页及 GatewayClass、Gateway 和 HTTPRoute。另见 Kubernetes SIG Network. (2024). Gateway API v1.2.1 specification. GitHub. 路由状态及后端引用。 ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
Kubernetes Authors. (n.d.). Custom Resources 与 Kubernetes Components (v1.32). Kubernetes Documentation. CRD 如何定义资源类型及 etcd 的控制面职责。 ↩
-
Envoy Project Authors. (n.d.). Envoy documentation. Configuration best practices 区分边缘代理和多层部署中的二级代理。Operations and administration 收录管理接口与统计信息。 ↩
-
Traefik Labs. (n.d.). Configuration Discovery (v3.3). Traefik Proxy documentation. Providers 及配置来源。开源实现见 Traefik Proxy 项目仓库。 ↩ ↩2
-
Sun, L., & Kohavi, Y. (2025, March 4). Five Learnings from Seven Years of Building Gloo and kgateway. kgateway. 捐赠背景及控制面与代理的分工。 ↩ ↩2
-
架构驿站(Luga). (2024, May 23). 一文读懂云原生网关 Traefik Providers. 腾讯新闻. “到底什么是 Traefik Providers?”第 3 段及“Traefik Providers 工作原理解析”的 Kubernetes Ingress 示例。 ↩
-
Traefik contributors. (2024). Kubernetes Ingress Provider (v3.0.0). GitHub.
Provide的事件循环、配置去重与发布,及loadConfigurationFromIngresses的路由构建。WatchAll监听的资源与缓存。 ↩ ↩2 -
Traefik Labs. (n.d.). Traefik vs Envoy Gateway. 厂商对比页、同页演示入口及 Traefik Hub 试用页。 ↩