Cilium Envoy Gateway

Published
Length
3 min read

Luis Felipe Dias

All posts

A cilium envoy gateway routes traffic into Kubernetes clusters using eBPF and Envoy. You set it up by enabling the Kubernetes Gateway API in your Cilium install. Most platform teams use this setup to manage north-south and east-west traffic in one place. They create listener rules and attach routes to backend services across namespaces. Still, broad route rules or shared cluster roles can expose internal apps to too many users. When permissions are too wide, any developer on the network can reac

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

A cilium envoy gateway routes traffic into Kubernetes clusters using eBPF and Envoy. You set it up by enabling the Kubernetes Gateway API in your Cilium install. Most platform teams use this setup to manage north-south and east-west traffic in one place. They create listener rules and attach routes to backend services across namespaces. Still, broad route rules or shared cluster roles can expose internal apps to too many users. When permissions are too wide, any developer on the network can reach sensitive backend services.

How a cilium envoy gateway works in Kubernetes

Cilium uses Linux eBPF programs to handle packet routing inside the kernel. When traffic needs HTTP inspection or TLS termination, Cilium hands that flow to Envoy. You can run Envoy right inside the Cilium agent or as its own DaemonSet. This choice lets teams isolate noisy traffic workloads from the core network control plane. Both tools read standard Kubernetes Gateway API objects to learn where packets should go.

To route traffic, platform admins first define a GatewayClass and a Gateway object. These objects tell the cluster which ports to open and which TLS keys to use. Next, app teams create HTTPRoute or GRPCRoute objects in their own namespaces. These route objects match hostnames, paths, and headers, then forward requests to backend pods. Cilium watches these objects and updates Envoy listener rules without dropping active connections.

Beyond basic routing, teams use Cilium network rules to restrict pod-to-pod traffic. You can write rules that allow or block requests based on pod labels and HTTP methods. Envoy enforces these web rules while eBPF drops bad packets at the socket level. This combination keeps service-to-service traffic fast and blocks unapproved pod communication across the cluster.

Where network routing works and what it leaves open

This native setup solves cluster ingress, load balancing, and pod-to-pod network isolation very well. It replaces older ingress controllers and gives teams a standard way to split traffic. You can run canary releases, mirror traffic, and enforce TLS across all microservices. For automated traffic between apps, eBPF and Envoy provide strong network boundaries.

Still, a network router does not govern what human engineers do inside backend systems. Once an engineer connects to a pod or database, network rules stop helping. The network setup only decides which pod or IP can open a port. It cannot check if an engineer runs a destructive SQL statement or reads customer records. It also cannot mask emails, phone numbers, or card numbers returned in query results.

API Gateway (Kong, Envoy) + Cilium Network Policies: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why human access needs controls beyond network rules

Engineers often bypass ingress routes altogether when they debug live issues in production. They use port forwarding or cluster admin roles to reach databases and internal tools. In these moments, Envoy routing rules and pod labels do not restrict their actions. Teams end up sharing static database keys or granting broad Kubernetes role bindings.

To secure human fixing, teams need controls that work at the command and query level. Instead of relying only on network paths, you must verify the person behind every request. You need a way to approve individual actions and rewrite sensitive fields in flight. Separating app ingress from human operational work keeps both your network and your data safe.

Check HTTP API requests and responses on the wire

API gateways and auth headers decide who may call an internal service. Request checks alone cannot read the response body where sensitive data leaves the service. With hoop.dev, you run an open-source proxy, a sidecar for your HTTP API. It runs beside an internal HTTP service or behind Envoy while keeping the API's own auth in place.

Dynamic path segments like IDs and UUIDs collapse to wildcards so one rule in hoop.dev guardrails can refuse banned methods or paths before execution with a 403 error. On the way back, hoop.dev data masking walks JSON payloads by key path and rewrites matched sensitive values in memory. Every request and decision is logged per caller, and hoop.dev is MIT licensed on GitHub.

Frequently asked questions

Does Cilium run Envoy inside the same pod or separately?

Cilium can run Envoy either embedded in the agent or as an independent DaemonSet. Running it separately helps teams isolate proxy resource use from core network operations.

Can Cilium replace a traditional Kubernetes Ingress controller?

Yes, it supports both standard Ingress objects and the newer Kubernetes Gateway API. Most teams use the Gateway API to get better role separation and header routing.

Does a cilium envoy gateway inspect database queries from engineers?

No, it routes network packets and HTTP traffic between services and pods. It does not approve SQL commands or mask sensitive fields like card numbers in database results.

Short role checks help teams work fast. Simple rules make each review clear. Good logs keep every team safe. Scoped keys stop bad changes early.

The query runs. The emails stay hidden.