게시 2026-12-04Published 2026-12-04Kubernetes읽는 시간 21분 · 그림과 자가 점검까지 약 1시간21 min read · about 1 hour with the figures and self-check

Istio 1시간 만에 이해하기Understanding Istio in One Hour

ELB for Envoy가 나오면서 Envoy를 직접 운영하지 않고도 Envoy의 L7 트래픽 제어를 쓸 수 있게 됐습니다. 아직 서비스 메시를 쓰지 않는 상황이라면, ELB for Envoy로 충분한지 메시까지 필요한지 판단하기 전에 Istio와 Envoy가 어떻게 생겼는지부터 알아야 하는데요. 이 글은 서비스 메시 개념부터 Istio의 컨트롤 플레인과 데이터 플레인, Envoy 설정과 xDS, 트래픽·보안 리소스, Gateway API와 Envoy Gateway까지 1시간 분량으로 정리하고, 마지막에 ELB for Envoy가 맡는 자리와 메시가 있어야 하는 자리를 나눠 봅니다.ELB for Envoy lets you use Envoy's L7 traffic control without running Envoy yourself. If you do not run a service mesh yet, you need to know how Istio and Envoy work before you can judge whether ELB for Envoy is enough or whether you need a mesh too. This post covers, in about an hour, what a service mesh is, Istio's control plane and data plane, Envoy config and xDS, the traffic and security resources, and Gateway API with Envoy Gateway. It ends by separating what ELB for Envoy takes on from what still needs a mesh.

#Istio#Envoy#Service mesh#ELB for Envoy#Gateway API#Kubernetes

Why I wrote this

In November 2026 AWS made ELB for Envoy generally available. It is a new load balancer type that runs open-source Envoy proxies for you: AWS handles patching, scaling and capacity across Availability Zones (AZs), and you bring your Envoy configuration[15]. Envoy extensions such as WebAssembly, Lua and external processing work too, and on Amazon EKS you can connect it to Envoy Gateway and configure it with Gateway API resources[15][16]. You get Envoy's L7 traffic control without running Envoy yourself.

Envoy also brings a service mesh such as Istio to mind. If you have not adopted a mesh yet, or are weighing one, you will want to know whether ELB for Envoy is enough or whether you need a mesh as well. To answer that, you first need to know what a mesh looks like. The Istio docs spread the concepts across feature pages, so the big picture is hard to get from them.

This post is meant to let someone new to Istio answer these questions in about an hour.

  1. What does a service mesh take out of the application?
  2. Why does Istio use Envoy, and how do istiod and Envoy connect?
  3. What are Envoy's config blocks (listener, route, cluster, endpoint) and xDS?
  4. How do VirtualService and DestinationRule become Envoy config?
  5. How does gateway-segment mTLS differ from mesh mTLS?
  6. How do the Istio API, the Kubernetes Gateway API and Envoy Gateway relate?
  7. How do EnvoyFilter and rate limits work?
  8. What value does ELB for Envoy add, and how do you split work between it and a mesh?

This is a study guide built from the official Istio, Envoy, Kubernetes Gateway API and AWS docs, not a test report. A post that moves an Istio Ingress Gateway to ELB for Envoy and goes deeper is listed under Further reading.

How to read this post

The sections add up to about an hour. Skim the twelve figures first and it goes faster.

OrderSectionTimeAfter it you can
0First, what is a service mesh?5 minsay what a service mesh takes out of the application
1The big picture: data plane and control plane8 minexplain why Istio uses Envoy and how istiod, the agent and Envoy connect
2Envoy basics: listener, route, cluster, endpoint and xDS8 minexplain what STRICT_DNS, EDS and file-based xDS mean
3How the sidecar gets in and how traffic is captured5 mintell what "a proxy on the backend or not" means
4Traffic management CRDs: Gateway, VirtualService, DestinationRule10 minexplain how a subset canary becomes Envoy config
5Security: workload identity, PeerAuthentication, AuthorizationPolicy7 mintell gateway mTLS from mesh mTLS
6Kubernetes Gateway API and Envoy Gateway7 minread the table that maps Istio resources to Gateway API
7EnvoyFilter and rate limits5 minread a per-Pod 100 TPS EnvoyFilter line by line
8What value does ELB for Envoy add?5 mintell the operations work ELB for Envoy takes off you from the places that still need a mesh

Spend about three minutes on the Self-check at the end.

00

First, what is a service mesh?

Once an application is split into many services, those services call each other over the network. Every call needs the same care: send it again when it fails (retries), give up when it takes too long (timeouts), send only some traffic to a new version (canary), encrypt the connection and check who is on the other end (mTLS), and record how often you called and how long it took (metrics).

A service mesh moves this work out of the application into an infrastructure layer. The Istio docs define a service mesh as "an infrastructure layer that gives applications capabilities like zero-trust security, observability, and advanced traffic management, without code changes"[18]. Without a mesh, each service builds these features into its own code or language-specific libraries; with a mesh, a proxy next to each app takes them over (inferred).

A service mesh moves retries, TLS and metrics out of app code into proxies next to each appWithout a meshWith a mesh (Istio)Service A (Java)app code + librariesretrytimeoutTLSmetricsService B (Go)app code + librariesretrytimeoutTLSmetricsEach service builds the samefeatures into its own codeControl plane (istiod): sends config and certificatesClientIngress gatewayEnvoy, mesh entrythe part that overlapswith ELB for EnvoyPod Aapp+ proxy (Envoy)Pod Bapp+ proxy (Envoy)App code stays the same; the proxy next toeach app does the workrequestconfig and certificatesPodIcons: Kubernetes icons, CC BY 4.0A service mesh moves retries, TLS and metrics out of app code into proxies next to each appWithout a meshService A (Java)retrytimeoutTLSmetricsService B (Go)retrytimeoutTLSmetricssame features in every service's codeWith a mesh (Istio)Control plane (istiod)Ingress gateway (Envoy)the part that overlaps with ELB for EnvoyPod A: app + proxyPod B: app + proxyrequestconfig and certificatesPodIcons: Kubernetes icons, CC BY 4.0

Figure 1. A service mesh moves retries, TLS and metrics out of app code into proxies next to each app.

What Istio providesExamples
Traffic managementCanary deployments, A/B testing, load balancing, failure recovery
SecuritymTLS encryption, policy management, access control based on workload identity
ObservabilityGenerates telemetry inside the mesh and integrates with tools such as Prometheus and Grafana

The rows come from Istio's own overview page[18].

A mesh works in two layers. A proxy next to each app (Istio uses Envoy) handles the actual traffic, and a central control plane sends configuration to those proxies. The proxy runs either as a sidecar inside the Pod or in ambient mode[18]. The next sections go through the two layers one at a time.

At the edge of the mesh sits one more proxy that accepts traffic from outside. That is the ingress gateway, and Istio configures its ports and TLS with the Gateway resource[2]. The ingress gateway is where ELB for Envoy overlaps with Istio. How it splits from the features inside the mesh, such as service-to-service mTLS and per-Pod policies, is covered in What value does ELB for Envoy add?.

01

The big picture: data plane and control plane

Istio has two parts. The data plane receives and forwards the actual requests, and it is made of Envoy proxies. The control plane tells those proxies how to route, and that is istiod[1].

Istio architecture: istiod is the control plane; Envoy sidecars and gateways form the data plane that every request passes throughClientoutside the meshExternaloutside the meshService meshControl planeistiodservice discovery · config (xDS) · certificates (CA)Data planeIngressgatewayEnvoyEgressgatewayEnvoyService AappEnvoy (sidecar)Service BappEnvoy (sidecar)config (xDS) + certificates to every Envoyingress trafficmesh traffic (mTLS)egress trafficEvery request passes through an Envoy; istiod only configures them.Sidecar mode. In ambient mode a per-node ztunnel (plus an optional waypoint) takes the sidecar's place.request trafficconfig and certificatesPodIcons: Kubernetes icons, CC BY 4.0Istio architecture: istiod is the control plane; Envoy sidecars and gateways form the data plane that every request passes throughControl planeistioddiscovery · config (xDS) · certs (CA)Client (outside the mesh)Data plane: every EnvoyIngress gatewayEnvoyService AEnvoy (sidecar)Service BEnvoy (sidecar)mTLSEgress gatewayEnvoyExternal service (outside the mesh)sidecar mode; ambient uses ztunnel insteadrequest trafficconfig and certificatesPodIcons: Kubernetes icons, CC BY 4.0

Figure 2. Istio architecture: istiod is the control plane; Envoy sidecars and gateways form the data plane that every request passes through.

Why Istio uses Envoy

Istio's data plane proxy is Envoy, more precisely an extended version of it: a high-performance proxy written in C++ that mediates all inbound and outbound traffic for every service in the mesh[1]. There are three reasons.

  1. It runs as its own process next to the app. Envoy describes itself as an out-of-process proxy that runs alongside application servers, so it works with any application language[19]. This sidecar model is why Istio says it can add capabilities to existing deployments without rewriting code[1].
  2. The features a mesh needs are already built in. The Istio docs list dynamic service discovery, load balancing, TLS termination, HTTP/2 and gRPC proxying, circuit breakers, health checks, %-based traffic splits, fault injection and rich metrics[1].
  3. Its config can change at runtime over an API. Envoy has layered dynamic configuration APIs (xDS) that deliver clusters, routes and certificates from a central place[19], and a route update does not affect requests in flight[10]. That is what lets istiod turn rules into Envoy config and push it to running proxies[1]. The Istio team says that, as of Istio 1.5, serving these Envoy xDS APIs dominates control plane cost[21].

I think the third reason matters most. Because the data plane (Envoy) and the control plane (whoever serves xDS) meet at one API, a setup like ELB for Envoy becomes possible: AWS runs Envoy, and xDS comes from somewhere else (inferred).

Istio's control plane (istiod) and data plane (Envoy in gateways and in each Pod's istio-proxy), and how config flowsWhat you doControl planeData planeIstio resourcesGatewayVirtualServiceDestinationRulePeerAuthentication1kubectl applyKubernetes APIstores CRDs, Services, Podsistiodone binaryPilot + Galley + Citadel + injector,merged in Istio 1.5Service discoveryRules → Envoy configCA: signs mTLS certsSidecar injection webhook3serves config over xDSgRPC :15012, plus certificates2Ingress gatewaystandalone Envoy at the edgePod Aistio-proxyappPod Bistio-proxyappistio-proxy = Istio agent + Envoy4Requests travel only between Envoys; istiod is not on the request path (inferred).1 apply → 2 istiod watches the Kubernetes API → 3 xDS to every Envoy → 4 requestsyou apply / istiod watchesxDS config and certificatesrequestPodCustom resourceIcons: Kubernetes icons, CC BY 4.0Istio's control plane (istiod) and data plane (Envoy in gateways and in each Pod's istio-proxy), and how config flows1 You apply Istio resourcesGatewayVirtualServiceDestinationRulePeerAuthenticationKubernetes API: stores them2 istiod watchesistiod (control plane)one binary since Istio 1.5Service discoveryRules → Envoy configCA: signs mTLS certsSidecar injection webhook3 xDS :15012Data plane (Envoy)Ingress gateway (own Envoy)Pod Aistio-proxyappPod Bistio-proxyappistio-proxy = Istio agent + Envoy4 requests: Envoy to Envoy onlyxDS config and certificatesrequestCustom resourcePodIcons: Kubernetes icons, CC BY 4.0

Figure 3. Istio's control plane (istiod) and data plane (Envoy in gateways and in each Pod's istio-proxy), and how config flows.

The components at a glance

PlaneComponentWhere it runsWhat it does
Control planeistiodOne Deployment in the cluster, a single binaryService discovery, turns rules into Envoy config sent over xDS, signs certificates as the CA, sidecar injection webhook
Data planeSidecar EnvoyThe istio-proxy container in each PodHandles traffic into and out of the Pod
Data planeIstio agent (pilot-agent)The same istio-proxy containerBootstraps Envoy and relays the xDS connection to istiod and certificates (SDS)
Data planeIngress and egress gatewaysStandalone Envoy at the mesh edgeTraffic entering and leaving the mesh; Gateway resources apply here

Sources: istiod's role[1], the agent bootstrapping Envoy in the sidecar or gateway container[20], the agent handing certificates to Envoy over SDS[3], and Gateway applying to standalone Envoy proxies at the edge rather than to sidecars[2]. In ambient mode, per-node ztunnel and waypoint proxies take the sidecar's place (covered in How the sidecar gets in and how traffic is captured).

If older material mentions Pilot, Galley or Citadel, read them as features that Istio 1.5 merged, together with the sidecar injector, into the single istiod binary[21].

Remember istiod as three jobs[1].

JobWhat it means
Service discoveryReads Kubernetes Services and Pods to learn which endpoints sit behind each destination
Config translation and deliveryTurns high-level rules such as VirtualService into Envoy config and pushes it to the proxies at runtime
Certificate managementActs as a CA (Certificate Authority) and issues certificates for mTLS (mutual TLS) in the data plane

How config flows

  1. You kubectl apply a resource such as a VirtualService, and the Kubernetes API stores it.
  2. istiod watches the Kubernetes API and reads Istio resources and changes to Services and Pods[1].
  3. istiod turns them into Envoy config: listeners, routes, clusters, endpoints[1].
  4. Each Envoy gets the new config from istiod's xDS (gRPC, port 15012) through the agent[5][20].
  5. Requests travel only between Envoys. istiod sends config but is not on the request path (inferred from the docs saying the data plane mediates all traffic)[1].

This split is also the starting point for ELB for Envoy. ELB for Envoy is a service in which AWS runs Envoy, the data plane, and the config comes from the Envoy configuration you bring or from a control plane[15]. On EKS, Envoy Gateway plays that control plane role[16].

02

Envoy basics: listener, route, cluster, endpoint and xDS

Whether you use ELB for Envoy or Istio, you end up working with Envoy config, so here is a closer look at Envoy. Read its config as four blocks, in the order a request passes through them.

Envoy configuration: listener, route, cluster and endpoints, each delivered by its own xDS APIConfig source: an xDS server over gRPC (istiod, Envoy Gateway) or files Envoy watchesOne request through one Envoy, left to rightListenerLDSRouteRDSClusterCDSEndpointsEDS:443 HTTPSfilter chain, in orderhttp_connection_managerlocal_ratelimitrouter (last)host api.example.commatch /ordersorder-stable 95%order-canary 5%rewrite, headers, retriesorder-stableorder-canaryROUND_ROBINupstream TLSconnection pool,circuit breaking10.0.1.11:808010.0.1.12:808010.0.2.31:8080real Pod / task / VM IPsSTATIC · STRICT_DNS · EDSSDScert + private keyListener TLS gets its certificate from SDS, without a restart.RDS/CDS updates swap in without breaking in-flight requests.request pathconfig / orderSecret (cert, key)Icons: Kubernetes icons, CC BY 4.0Envoy configuration: listener, route, cluster and endpoints, each delivered by its own xDS APIOne request, top to bottomListener :443LDShttp_connection_managerlocal_ratelimitrouter (last)RouteRDS/orders → stable 95%, canary 5%rewrite, headers, retriesClusterCDSorder-stableorder-canaryROUND_ROBIN · TLS · poolEndpointsEDS10.0.1.11:8080, 10.0.1.12:8080STATIC · STRICT_DNS · EDSSDS: cert + private keyto Listener TLS, no restartrequest pathSecretIcons: Kubernetes icons, CC BY 4.0

Figure 4. Envoy configuration: listener, route, cluster and endpoints, each delivered by its own xDS API.

BlockWhat it decidesxDS that delivers it
ListenerWhich port to accept on and which filter chain to runLDS (Listener Discovery Service)
RouteWhich cluster to send to, based on host, path and headers, and with what weightsRDS (Route Discovery Service)
ClusterThe group of upstream targets, load balancing, connection pool, TLSCDS (Cluster Discovery Service)
EndpointThe actual IP:port list in a clusterEDS (Endpoint Discovery Service)
SecretCertificates and private keysSDS (Secret Discovery Service)

xDS is the collective name for these discovery services. ADS (Aggregated Discovery Service) carries every resource type over one gRPC stream in a fixed order, and it is gRPC-only. The Envoy docs say an RDS update swaps routes in without affecting requests in flight, and CDS adds, updates and removes clusters[10].

How a cluster finds its endpoints: STATIC, STRICT_DNS, EDS

Envoy has six ways for a cluster to find its endpoints, and three of them come up most often[11].

TypeBehaviorWhen to use it
STATICIP:port written directly in the configTargets that rarely change. Someone has to edit it when Pods change
STRICT_DNSKeeps re-resolving the DNS name asynchronously and treats every returned IP as its own host. dns_refresh_rate defaults to 5000 msGive it a headless Service name and every Ready Pod IP becomes a host
EDSAn xDS server sends the endpoint list, with attributes such as weightsWhat Istio and Envoy Gateway use. Pod changes show up at once
How an Envoy cluster finds its endpoints: STATIC, STRICT_DNS and EDSSTATICSTRICT_DNSEDSEnvoy cluster10.0.1.11, 10.0.1.12typed into the configPod replacednew IP 10.0.1.40Envoy keeps the old IPsuntil someone edits the fileEnvoy clusterapi.order.svc (DNS name)headless ServiceclusterIP: Nonere-resolve every 5 s*Ready Podsevery returned IP = one hostxDS serveristiod, Envoy Gateway, your ownEnvoy clusterendpoints + weight, localitypush on changePod changes show up at onceserver watches EndpointSlice* Envoy default dns_refresh_rate is 5000 ms; you can set it per cluster.STRICT_DNS + headless Service + ROUND_ROBIN: each Ready Pod gets the same shareWorked example: 50 on-prem hosts + N EKS Pods in one cluster, EKS share = N / (N + 50)EKS Pods 1016.7%10/60EKS Pods 5050.0%50/100EKS Pods 30085.7%300/350EKS shareon-prem sharelookup / push of endpointsstale, not updatedPodServiceIcons: Kubernetes icons, CC BY 4.0How an Envoy cluster finds its endpoints: STATIC, STRICT_DNS and EDSSTATICIPs typed into the configPod replaced → Envoy keeps the old IPuntil someone edits the fileSTRICT_DNSre-resolves the DNS name every 5 s*headless Serviceeach Ready Pod IP = a hostEDSxDS server pushes the endpoint listwith weights and localityPod changes show up at once* default 5000 ms, set per clusterShare follows the Ready Pod countexample: 50 on-prem + N Pods, share N/(N+50)EKS 1016.7%EKS 5050.0%EKS 30085.7%stalePodServiceIcons: Kubernetes icons, CC BY 4.0

Figure 5. How an Envoy cluster finds its endpoints: STATIC, STRICT_DNS and EDS.

A headless Service (clusterIP: None) answers DNS with the list of Ready Pod IPs instead of a Service IP. So STRICT_DNS + headless Service + ROUND_ROBIN splits traffic as "the same share per Ready Pod". The bars at the bottom of the figure are a worked example. Say you are moving from on-premises to EKS, and you put 50 on-premises hosts and some EKS Pods into one cluster with ROUND_ROBIN. The EKS share is then Pods / (Pods + 50). With 10, 50 or 300 Pods that is 16.7%, 50% or 85.7%, so adding Pods alone shifts traffic to EKS.

xDS can come from files

You do not always need an xDS server. Envoy can read LDS and CDS from file paths set in the bootstrap's dynamic_resources. Editing the file in place is not picked up; Envoy reloads only when a new file is moved into place[12]. This is easy to miss when you try it yourself, so check it.

Filter chain

A listener holds a filter chain. HTTP handling happens inside envoy.filters.network.http_connection_manager (HCM), where HTTP filters run in order. The last one is always envoy.filters.http.router, which forwards the request upstream. An example that inserts the rate limit filter (local_ratelimit) in front of the router is in EnvoyFilter and rate limits.

03

How the sidecar gets in and how traffic is captured

Automatic sidecar injection and how iptables sends Pod traffic through the istio-proxyInjection, at Pod creationnamespace labelistio-injection=enabled1Pod is createdkube-apiserver → webhook2Mutating webhook (istiod)adds istio-init + istio-proxy3READY 1/1 → 2/2running Pods: restart them4Inside the Pod, after injectionPod order/apiistio-init: iptables sends all traffic to the proxyistio-proxyEnvoy + Istio agent:15006 inbound= SIDECAR_INBOUND:15001 outbound= SIDECAR_OUTBOUND:15021 health:15090 metricsapp:8080request inout to other servicesistiod :15012xDS config + certificatesrequest trafficconfig and certificatesstep orderPodNamespaceIcons: Kubernetes icons, CC BY 4.0Automatic sidecar injection and how iptables sends Pod traffic through the istio-proxyInjection, at Pod creation1namespace label istio-injection=enabled2Pod is created → kube-apiserver → webhook3webhook adds istio-init + istio-proxy4READY 1/1 → 2/2; restart running PodsInside the PodPod order/apiistio-init: iptables → proxyistio-proxy (Envoy + agent):15006 inbound = SIDECAR_INBOUND:15001 outbound = SIDECAR_OUTBOUND:15021 health · :15090 metricsapp :8080inoutistiod :15012 → xDS + certificatesrequest trafficstep orderPodIcons: Kubernetes icons, CC BY 4.0

Figure 6. Automatic sidecar injection and how iptables sends Pod traffic through the istio-proxy.

Injection

Label a namespace istio-injection=enabled (or with a revision label istio.io/rev=<rev>) and a mutating admission webhook adds the istio-proxy container to every Pod created there afterwards. The Deployment itself does not change; injection happens when the Pod is created, so running Pods get a sidecar only after they are recreated. An injected Pod goes from READY 1/1 to 2/2, and an istio-init container sets up the traffic redirect[4].

Redirect and ports

Once istio-init has installed its iptables rules, everything the app sends and receives goes through the sidecar Envoy. These are the ports worth knowing[5].

PortUse
15001Envoy outbound (traffic the app sends out)
15006Envoy inbound (traffic coming into the Pod)
15008HBONE (HTTP-Based Overlay Network Environment) mTLS tunnel (ambient)
15021Health checks
15090Envoy Prometheus metrics
15012istiod xDS and CA services (TLS/mTLS)

SIDECAR_INBOUND, which you see often in EnvoyFilters, refers to the 15006 side, where the sidecar receives requests coming into the Pod. It means the sidecar inside the Pod can process a request once more, after the gateway has sent it to the Pod and before it reaches the app. That is why features such as per-Pod rate limits are possible only in the sidecar.

Ambient, in one paragraph

Ambient mode puts no sidecar in the Pod. It runs an L4 proxy, ztunnel, on every node, and adds a waypoint proxy (Envoy) when L7 is needed. ztunnel handles mTLS, L4 authorization and telemetry and does not parse HTTP headers[6]. This post explains sidecar mode, so this is all you need about ambient for now.

04

Traffic management CRDs: Gateway, VirtualService, DestinationRule

These are the first resources you meet in Istio. Start with what each one owns[2].

ResourceWhat it ownsEnvoy counterpart (inferred)
Gateway (networking.istio.io)Port, protocol, TLS and accepted hosts of an edge proxy. L4 to L6Listener
VirtualServicePath and header matching, how much traffic goes to which destination, retries and timeoutsRoute
DestinationRulePolicy applied after routing: subsets, load balancing, connection pool, outlier detection (circuit breaking), TLSCluster
ServiceEntryAdds destinations outside the mesh to Istio's registryCluster + Endpoint
Sidecar (resource)Narrows the ports a sidecar accepts and the destinations it must knowSize of sidecar config

The "Envoy counterpart" column is a study aid. It does not mean istiod translates exactly one to one.

An Istio Gateway works together with a VirtualService

An Istio Gateway sets only ports and TLS. L7 routing works only when a VirtualService binds to that Gateway through its gateways field[2]. An Istio Gateway also only configures a gateway Deployment that already exists (for example istio-ingressgateway), which it picks with selector[7]. This is how it differs from the Gateway API Gateway later on.

Take an order API as an example. Written in Istio it looks roughly like this: stable/canary subsets are split by label and get 95:5.

yaml
apiVersion: networking.istio.io/v1
kind: Gateway
metadata: {name: public-gw, namespace: istio-ingress}
spec:
  selector: {istio: ingressgateway}        # picks the gateway Pods that already run
  servers:
  - port: {number: 443, name: https, protocol: HTTPS}
    hosts: ["api.example.com"]
    tls: {mode: SIMPLE, credentialName: api-cert}   # TLS Secret name; Istio's example creates it in istio-system, where the gateway runs
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata: {name: order-api, namespace: order}
spec:
  hosts: ["api.example.com"]
  gateways: ["istio-ingress/public-gw"]    # without this line it is not bound to the Gateway
  http:
  - match: [{uri: {prefix: /orders}}]
    route:
    - destination: {host: api.order.svc.cluster.local, subset: stable}
      weight: 95
    - destination: {host: api.order.svc.cluster.local, subset: canary}
      weight: 5
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata: {name: order-api, namespace: order}
spec:
  host: api.order.svc.cluster.local
  trafficPolicy:
    connectionPool: {http: {http1MaxPendingRequests: 100}}
    outlierDetection: {consecutive5xxErrors: 5, interval: 10s, baseEjectionTime: 30s}
  subsets:
  - name: stable
    labels: {version: stable}
  - name: canary
    labels: {version: canary}
How istiod turns Gateway, VirtualService and DestinationRule into Envoy listener, route and clustersIstio resourcesEnvoy config in the gatewayistiodtranslatesGatewayport 443 HTTPShost api.example.com, TLS certVirtualServicegateways: public-gw/orders → stable 95, canary 5DestinationRulesubset stable: version=stablesubset canary: version=canaryconnectionPool,outlierDetectionListener :443filter chain + TLS from SDSRouteapi.example.com /ordersweighted: stable 95, canary 5Clusters, one per subset (inferred)+ connection pool, outlier detectionapi | stableapi | canaryService apinamespace orderone Service; Podstold apart by labelversion=stableversion=canaryistiod translatestraffic to the subset's PodsIstio custom resourceServicePodIcons: Kubernetes icons, CC BY 4.0How istiod turns Gateway, VirtualService and DestinationRule into Envoy listener, route and clustersistiod translates each resourceGatewayport 443, host, TLSistiodListener :443VirtualService/orders → stable 95, canary 5istiodRoute (weighted)DestinationRulesubsets by label versionistiodCluster per subset (inferred)Service api: one Serviceversion=stableversion=canaryistiod translatesIstio custom resourceServicePodIcons: Kubernetes icons, CC BY 4.0

Figure 7. How istiod turns Gateway, VirtualService and DestinationRule into Envoy listener, route and clusters.

A subset is "the Pods of one Service, split again by label". istiod builds a separate Envoy cluster per subset and filters each cluster's endpoints by label (inferred: istioctl proxy-config cluster shows one cluster per subset). Anything that sees only the Kubernetes Service cannot see this split. So when you move to Gateway API, you split the subsets into "two Services with different labels", which comes up again in Kubernetes Gateway API and Envoy Gateway.

05

Security: workload identity, PeerAuthentication, AuthorizationPolicy

How a sidecar gets its SPIFFE certificate, and gateway mTLS versus mesh mTLSHow a sidecar gets its identity certificateistiod CAchecks the CSR'scredentials and signs itistio-proxy containerIstio agentmakes key + CSRrotates before expiryEnvoyuses the cert for mTLS1 CSR2 signed cert3 SDSidentity: spiffe://<trust domain>/ns/order/sa/apiTwo different mTLS segmentsClientGateway (Envoy)Pod A sidecarPod B sidecarabcaTLSthe gateway showsa server certificatebGateway mTLSgateway client cert; checks backendcert by CA and SANGateway API: BackendTLSPolicy,Gateway tls.backendcMesh mTLSboth sides show SPIFFE certsissued by istiodPeerAuthentication STRICT:mTLS onlyplaintext into STRICT: rejectedcertificate flowrequestrejectedPodIcons: Kubernetes icons, CC BY 4.0How a sidecar gets its SPIFFE certificate, and gateway mTLS versus mesh mTLSIdentity certificate1Istio agent: private key + CSR2istiod CA checks and signs3Envoy gets it from the agent (SDS)spiffe://<trust domain>/ns/order/sa/apiTwo different mTLS segmentsaClient → gateway: TLSserver certificatebGateway → Pod: gateway mTLSclient cert; backend cert by CA, SANBackendTLSPolicy, tls.backendcPod ↔ Pod: mesh mTLSSPIFFE certs from istiodPeerAuthentication STRICTplaintext into STRICT: rejectedcertificate flowrejectedIcons: Kubernetes icons, CC BY 4.0

Figure 8. How a sidecar gets its SPIFFE certificate, and gateway mTLS versus mesh mTLS.

Identity and certificates

An Istio workload identity is a SPIFFE (Secure Production Identity Framework For Everyone) URI: spiffe://<trust domain>/ns/<namespace>/sa/<service account>. The certificate arrives like this[3].

  1. The Istio agent in the sidecar creates a private key and a CSR (Certificate Signing Request) and sends the CSR to istiod.
  2. istiod's CA checks the credentials in the CSR and signs it.
  3. Envoy gets the certificate and key from the Istio agent in the same container over the SDS API.
  4. The agent watches expiry and rotates the certificate on its own.

istiod issues these certificates per service account, so a proxy outside the mesh does not join this system on its own (inferred). Keep this in mind when you put an external gateway such as ELB for Envoy in front.

PeerAuthentication: does the receiver require mTLS?

ModeMeaning
PERMISSIVEAccepts both mTLS and plaintext
STRICTAccepts mTLS only
DISABLEmTLS off

An unset mode inherits from the parent scope, and a mesh-wide policy with no mode defaults to PERMISSIVE[3].

This matters because when a Pod is STRICT, requests from clients that cannot present a mesh identity certificate are rejected. Sending straight from a gateway outside the mesh to a STRICT Pod needs its own design for identity and certificates on that segment (inferred).

AuthorizationPolicy: who may come in

An AuthorizationPolicy picks target workloads with selector and writes rules with from.source.principals (the caller's SPIFFE identity), methods and paths, and when conditions. Its actions are CUSTOM, DENY and ALLOW, evaluated in that order[3]. Principal-based rules only mean something when an identity was verified over mTLS, so read them together with mesh mTLS (inferred).

Gateway-segment mTLS and mesh mTLS are different things

mTLS shows up in two places, which is easy to confuse. Keep them apart like this.

SegmentWho presents certificatesWho manages it
Gateway ↔ backend mTLSThe gateway presents a client certificate and checks the backend's server certificate by CA and SAN (Subject Alternative Name)Gateway config (in Gateway API: BackendTLSPolicy + the Gateway's client certificate)
Mesh mTLSSidecars present SPIFFE certificates to each otheristiod CA, PeerAuthentication

The gateway-segment settings come back with BackendTLSPolicy in Kubernetes Gateway API and Envoy Gateway[13].

06

Kubernetes Gateway API and Envoy Gateway

A Gateway API Gateway both configures and deploys

Istio supports the Kubernetes Gateway API and says it intends to make it the default API for traffic management. The Istio docs point out three differences[7].

  1. An Istio Gateway only configures a gateway that was deployed beforehand; a Gateway API Gateway configures and deploys one. Create a Gateway with gatewayClassName: istio and a Deployment and Service named <Gateway name>-<GatewayClass name> appear.
  2. Where one VirtualService carried every protocol, Gateway API splits them into per-protocol resources such as HTTPRoute and TCPRoute.
  3. Gateway API does not cover 100% of Istio's features.
Istio Gateway only configures a pre-installed gateway; a Gateway API Gateway also deploys oneIstio APIKubernetes Gateway APIDeployment istio-ingressgatewayinstalled beforehandGatewayselector: istio=ingressgatewayVirtualServicegateways: [public-gw], weight 95/5DestinationRule + one Servicesubsets stable / canary by Pod labelconfiguresbinds toGatewaygatewayClassName: istioDeployment + Service gateway-istiocreated by the controllerHTTPRouteparentRefs: gateway; backendRefs weightService api-stable 95Service api-canary 5subset → separate Servicescreatesattachescontroller deploysconfigures / attachestraffic weightDeploymentCustom resourceServiceIcons: Kubernetes icons, CC BY 4.0Istio Gateway only configures a pre-installed gateway; a Gateway API Gateway also deploys oneIstio APIDeployment istio-ingressgatewayinstalled beforehandGateway (selector)only configures itVirtualService (gateways)subsets in a DestinationRuleKubernetes Gateway APIGateway (gatewayClassName: istio)creates Deployment + ServiceHTTPRoute (parentRefs)backendRefs with weightapi-stable 95api-canary 5subset → separate ServicesDeploymentCustom resourceIcons: Kubernetes icons, CC BY 4.0

Figure 9. Istio Gateway only configures a pre-installed gateway; a Gateway API Gateway also deploys one.

yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata: {name: gateway, namespace: istio-ingress}
spec:
  gatewayClassName: istio
  listeners:
  - name: default
    hostname: "*.example.com"
    port: 80
    protocol: HTTP
    allowedRoutes: {namespaces: {from: All}}
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata: {name: http, namespace: default}
spec:
  parentRefs: [{name: gateway, namespace: istio-ingress}]
  hostnames: ["httpbin.example.com"]
  rules:
  - matches: [{path: {type: PathPrefix, value: /get}}]
    backendRefs: [{name: httpbin, port: 8000}]

This example is from the Istio docs[7]. Weights go on each backendRefs entry as weight, and the target is a Service, so instead of the subsets you saw earlier you split into two Services. A blue/green move such as 100:0 → 95:5 → 50:50 → 0:100 works this way.

Backend TLS: BackendTLSPolicy and the client certificate

A BackendTLSPolicy attaches to a Service and sets the SNI the gateway uses toward the backend and how the backend certificate is verified. It needs a hostname and caCertificateRefs (or wellKnownCACertificates), and it has been in the Standard Channel since v1.4.0. The client certificate the gateway presents to backends is set with tls.backend.clientCertificateRef on the Gateway, and it applies to every upstream connection of that Gateway. It has been in the Standard Channel since v1.5.0[13].

Envoy Gateway: the control plane that turns Gateway API into Envoy config

Envoy Gateway reads Gateway API resources and turns them into Envoy xDS. Think of it as sitting where istiod sits in Istio (inferred). Features missing from the Gateway API standard come from its own policy resources[14].

Envoy Gateway resourceWhat it owns
BackendTrafficPolicyGateway → backend: circuit breaking, local and global rate limits, retries, load balancing, health checks
ClientTrafficPolicyClient → gateway: connection behavior, timeouts, TLS
SecurityPolicyAuthentication and authorization such as JWT, CORS, IP filtering
EnvoyProxyHow Envoy is deployed, telemetry, infrastructure provider settings

Where ELB for Envoy fits in this picture

The Kubernetes integration of ELB for Envoy sits on top of this. Envoy Gateway runs in the cluster as the xDS control plane, a remote infrastructure provider calls the ELB for Envoy API to create the proxy, and AWS runs the proxy fleet. If you already use Envoy Gateway, your Gateway API resources and control plane stay; only the place where Envoy runs changes[16]. A Gateway moves to ELB for Envoy when you attach an ELBProxyConfiguration resource, which carries the proxy's IAM role, subnets and security groups. AWS marks this integration as early development (API version v1alpha1)[17]. ELB for Envoy became generally available on 2026-11-25 and is offered in 14 Regions, Tokyo among them[15].

ELB for Envoy on EKS: Envoy Gateway stays in the cluster as the xDS control plane and AWS runs the Envoy fleetRequest path (example)CloudFrontinternal NLBELB for EnvoyEC2ECSEKSno proxy on backends by defaultsame proxiesConfig path on EKSAmazon EKS clusterGatewayHTTPRouteBackendTLSPolicyBackendTrafficPolicyELBProxyConfigurationGateway API · Envoy Gateway ·AWS extension resourcesEnvoy GatewayxDS control planeremote infrastructureproviderIstio CRDs are not read:VirtualService, DestinationRule, EnvoyFilterELB for Envoy accountAWS runs the proxy fleetELB for Envoy APIEnvoyEnvoyEnvoypatching, scaling and AZ capacityare handled by AWScreatexDSrequestxDS configAPI call / referenceAmazon CloudFrontNetwork Load BalancerElastic Load BalancingAWS accountIcons: AWS Architecture IconsELB for Envoy on EKS: Envoy Gateway stays in the cluster as the xDS control plane and AWS runs the Envoy fleetRequest path (example)CloudFrontinternal NLBELB for EnvoyEC2ECSEKSConfig path on EKSAmazon EKS clusterGatewayHTTPRouteBackendTLSPolicyBackendTrafficPolicyELBProxyConfigurationEnvoy Gateway: xDS control plane+ remote infrastructure providercreatexDSELB for Envoy account (AWS)EnvoyEnvoyEnvoyIstio CRDs are not readVirtualService, DestinationRule, EnvoyFilterrequestxDS configElastic Load BalancingAWS accountIcons: AWS Architecture Icons

Figure 10. ELB for Envoy on EKS: Envoy Gateway stays in the cluster as the xDS control plane and AWS runs the Envoy fleet.

Istio → Gateway API mapping

If you move a gateway from the mesh to Gateway API, keep this table next to you[2][7][13][14].

IstioGateway API / Envoy GatewayNote
Gateway (port, host, TLS)Gateway listenersThe Gateway API version also deploys
VirtualService (path, header, weight)HTTPRouteWeights target Services, not subsets
DestinationRule subsetSeparate Services with different labelsPod-label canary does not move as is
DestinationRule connection pool, outlier detectionBackendTrafficPolicyEnvoy Gateway extension
DestinationRule TLSBackendTLSPolicy + Gateway client certificate
EnvoyFilterNo general equivalentConfig on the sidecar inside the Pod cannot move
PeerAuthentication, AuthorizationPolicyNo equivalent (mesh features)Stay in Istio if you keep the mesh

07

EnvoyFilter and rate limits

EnvoyFilter is the emergency exit

EnvoyFilter patches the Envoy config istiod generates. The Istio docs warn that the API is tied deeply to Istio's internals and to Envoy's xDS API, that it must be checked for deprecated fields on every proxy upgrade, and that conflicting EnvoyFilters give undefined behavior. You choose where to patch with context (SIDECAR_INBOUND, SIDECAR_OUTBOUND, GATEWAY, ANY) and applyTo (HTTP_FILTER, CLUSTER, HTTP_ROUTE and others), and how with operations such as MERGE, INSERT_BEFORE and REPLACE[8].

Local and global limits

Local rate limits keep a bucket per proxy; global rate limits share one counter in a rate limit serviceLocal: one token bucket per proxyGlobal: one shared counterrequests to order/apiPod Asidecarbucket100 / sPod Bsidecarbucket100 / sPod Csidecarbucket100 / sEach Pod refills on its own: 3 Pods ≈ 300/sIstio: EnvoyFilter, SIDECAR_INBOUND,local_ratelimit before routerover the limit → 429Envoyasks before forwardingRate limit servicegRPC · shared countdescriptor: path=/orders, limit 3EC2ECSEKSrequest 1allowedrequest 2allowedrequest 3allowedrequest 4429 over the shared limitthree destinations share one limitrequestquota check (gRPC)PodAmazon EC2Amazon ECSAmazon EKSIcons: AWS Architecture Icons; Kubernetes icons, CC BY 4.0Local rate limits keep a bucket per proxy; global rate limits share one counter in a rate limit serviceLocal: one bucket per proxyPod Abucket100/sPod Bbucket100/sPod Cbucket100/s3 Pods ≈ 300/s in totalEnvoyFilter, SIDECAR_INBOUNDover the limit → 429Global: one shared counterEnvoyRate limitservice (gRPC)limit 3, shared by EC2 · ECS · EKSrequest 1allowedrequest 2allowedrequest 3allowedrequest 4429quota check (gRPC)PodIcons: Kubernetes icons, CC BY 4.0

Figure 11. Local rate limits keep a bucket per proxy; global rate limits share one counter in a rate limit service.

TypeBehaviorWhere it applies
Local (local_ratelimit)Each proxy instance has its own token bucket and calls no other serviceOn sidecars, each Pod gets its own limit; on a gateway, the limit is per gateway
GlobalAsks an external rate limit service for quota over gRPC; descriptors classify requestsSeveral destinations share one limit. Not supported in the EKS integration of ELB for Envoy

The Istio docs also describe local limits as applied per service instance without calling another service, and global limits as quota from a gRPC rate limit service[9]. The AWS docs say global rate limiting is not supported with the Envoy Gateway integration of ELB for Envoy, so use local rate limiting instead[17].

Reading a per-Pod 100 TPS EnvoyFilter

This example puts "at most 100 requests per second for each order/api Pod" on the sidecar. Each line that matters has a comment.

yaml
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata: {name: api-inbound-100rps, namespace: order}
spec:
  workloadSelector:
    labels: {app: api}                 # only sidecars of app=api Pods in namespace order
  configPatches:
    - applyTo: HTTP_FILTER             # touch the HTTP filter list
      match:
        context: SIDECAR_INBOUND       # traffic coming into the Pod (15006)
        listener:
          portNumber: 8080             # requests to app port 8080
          filterChain:
            filter:
              name: envoy.filters.network.http_connection_manager
              subFilter: {name: envoy.filters.http.router}
      patch:
        operation: INSERT_BEFORE       # insert right before the router
        value:
          name: envoy.filters.http.local_ratelimit
          typed_config:
            "@type": type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
            stat_prefix: order_api_inbound
            token_bucket:              # refill 100 every second, hold at most 100
              max_tokens: 100
              tokens_per_fill: 100
              fill_interval: 1s
            filter_enabled:            # evaluate 100% of requests
              default_value: {numerator: 100, denominator: HUNDRED}
            filter_enforced:           # and actually reject (429) 100% of the excess
              default_value: {numerator: 100, denominator: HUNDRED}
            response_headers_to_add:
              - header: {key: x-order-pod-limit, value: "true"}
                append_action: OVERWRITE_IF_EXISTS_OR_ADD

Each sidecar has its own token bucket, so the service-wide limit grows with the Pod count. And because this config lives on the sidecar inside the Pod, it cannot move to a gateway outside the Pod, ELB for Envoy included.

08

What value does ELB for Envoy add?

As the earlier sections show, Envoy can do a lot, and running it yourself takes just as much work. ELB for Envoy hands that work to AWS. In terms of the data plane and control plane, only the place where Envoy runs moves to AWS; you still send the config as before[15].

AWS takes over the operations you used to do

AWS describes platform teams that run Envoy themselves as owning upgrades, security patching and capacity across Availability Zones (AZs), and says ELB for Envoy takes on that work[15]. The same holds on EKS. Envoy Gateway normally runs Envoy as Pods in your cluster, so sizing, scaling, upgrades and CVE patching are all yours. With ELB for Envoy attached, AWS runs those Envoy proxies for you[17].

WorkRunning Envoy yourselfWith ELB for Envoy
Upgrades, security patchingYouAWS[15]
AZ capacity, scalingYou (replica and autoscaling settings)AWS. Kubernetes replica and autoscaling settings do not apply[15][17]
IsolationYou design itDedicated EC2 instances per load balancer, hardware isolation from the Nitro System[15]
Subnets, security groupsYouThe EKS integration controller uses the subnets it discovers or you name, and creates and maintains security groups[17]
Routing and policyGateway API + Envoy GatewayStill Gateway API + Envoy Gateway[17]

On isolation, the AWS announcement says a zero-day in Envoy stays contained to your load balancer[15].

Envoy's extensibility stays

Managed does not mean fewer features. You can bring your existing Envoy configurations, extensions and control planes as they are, and add your own logic with WebAssembly, Lua or external processing[15]. AWS names three uses[15].

  • Workloads that need Envoy's extensibility, such as custom authentication, request transformation or advanced routing
  • Kubernetes ingress
  • Migrations from self-managed Envoy

What changes on EKS

On EKS, Envoy Gateway keeps serving xDS from inside the cluster, and only the proxy runs on ELB for Envoy (Where ELB for Envoy fits in this picture). Because the proxy sits outside the cluster, four things change[17].

  • Pod IPs must be routable in the VPC (for example with the Amazon VPC CNI).
  • Access logs must go to a network sink such as OpenTelemetry or ALS (Access Log Service), not to a file.
  • Global rate limiting is not supported, so use local rate limiting.
  • The integration is still in early development (v1alpha1).

How to split work with a mesh

Mapped onto Istio's architecture, ELB for Envoy takes the place of the ingress gateway at the mesh edge. It does not replace the sidecar next to each Pod or the ztunnel on each node (inferred).

FeatureAt the gateway (ELB for Envoy)Needs a mesh (sidecar or ztunnel)
Path and header routing, weighted splitsYes (route config)When calls between services need the same control
TLS, gateway → backend mTLSYes (BackendTLSPolicy + Gateway client certificate)[13]For mTLS between services with SPIFFE identities[3]
Rate limitsLocal limits per gateway. Global limits are not supported[17]Separate limits per Pod (sidecar SIDECAR_INBOUND)[8]
Workload identity, AuthorizationPolicyNot applicableNeeds the istiod CA and sidecars[3]
Istio CRDs (VirtualService, DestinationRule, EnvoyFilter)Must be rewritten as Gateway API or Envoy configTurning Istio CRDs into Envoy config is istiod's job[1]
Where ELB for Envoy fits and what still needs a meshELB for Envoy (ingress gateway)Needs a mesh (sidecar or ztunnel)Path / header routing, weightsTLS, gateway-to-backend mTLSLocal rate limit per gatewayWasm, Lua, external processingPatching, scaling, AZ capacity by AWSService-to-service mTLS (SPIFFE)AuthorizationPolicy between servicesPer-Pod limits (sidecar)Routing and retries between servicesReading Istio CRDs (istiod)ELB for Envoy runs the edge data plane; traffic between services inside the cluster is the mesh's job.Based on the AWS ELB for Envoy docs and the Istio docsWhere ELB for Envoy fits and what still needs a meshELB for Envoy (ingress gateway)Path / header routing, weightsTLS, gateway-to-backend mTLSLocal rate limit per gatewayWasm, Lua, external processingPatching, scaling, AZ capacity by AWSNeeds a mesh (sidecar or ztunnel)Service-to-service mTLS (SPIFFE)AuthorizationPolicy between servicesPer-Pod limits (sidecar)Routing and retries between servicesReading Istio CRDs (istiod)Based on the AWS and Istio docs

Figure 12. Where ELB for Envoy fits and what still needs a mesh.

Here is my own take (inferred). If you have no mesh yet and what you need now is L7 routing, weighted rollouts, backend mTLS and per-gateway rate limits at the cluster entrance, ELB for Envoy with Envoy Gateway is a reasonable place to start, without the burden of running Envoy yourself. Once you need mTLS and workload identity between services, authorization between services, or per-Pod policies, that is the time to look at a mesh seriously. Istio supports Gateway API too, so the Gateway API routing you learn along the way still applies after you adopt a mesh.

A post that moves Istio Ingress Gateway features to ELB for Envoy one by one and measures them is listed under Further reading. If you are planning a real migration, read it next.

Self-check

If these answers come to you right away, this post has done its job.

1. Why can't ELB for Envoy read a VirtualService as is?

Answer: Turning a VirtualService into Envoy config is the job of istiod (the control plane), and ELB for Envoy is a service that runs Envoy (the data plane). The config has to come separately over xDS, from your own control plane or Envoy Gateway.

2. Why does a headless Service + STRICT_DNS split traffic in proportion to the Pod count?

Answer: A headless Service answers DNS with the Ready Pod IP list, and STRICT_DNS adds every IP in the answer as its own host. With ROUND_ROBIN on top, each host (= Pod) gets the same share.

3. What must change when you move a DestinationRule subset canary to Gateway API?

Answer: HTTPRoute weights target Services, so split stable/canary into two Services with different labels and set a weight on each backendRefs entry.

4. What happens when a gateway outside the mesh sends plaintext to a Pod with PeerAuthentication STRICT?

Answer: STRICT accepts only mTLS, so the request is rejected. Gateway-segment mTLS (BackendTLSPolicy and so on) is a different system from mesh SPIFFE identities, so you have to line them up yourself.

5. A sidecar local_ratelimit of 100/s on 3 Pods gives what service-wide limit?

Answer: About 300/s, because each Pod has its own token bucket. To hold the whole service to one limit you need a global limit (an external rate limit service).

6. Which parts of running Envoy leave your hands with ELB for Envoy?

Answer: AWS takes over upgrades and security patching, AZ capacity and scaling. You still set routing and policy with Gateway API and Envoy Gateway.

What this post leaves out

To fit an hour, these topics are left out. If you are seriously evaluating a mesh, they are good next steps.

TopicIn one line
Ambient mode in depthHow per-node ztunnel, waypoint and HBONE tunnels replace the sidecar
Multi-clusterJoining several clusters into one mesh
Egress gateway in detailSending traffic that leaves the mesh through one place
UpgradesRunning istiod revisions side by side and moving over
Observability toolsConnecting to tools such as Prometheus and Grafana

Further reading

References

이 글을 쓰게 된 이유

2026년 11월에 AWS가 ELB for Envoy를 정식 출시했는데요. 오픈소스 Envoy 프록시를 AWS가 대신 운영해 주는 새 로드밸런서 유형이라서, 패치와 확장, 가용 영역(AZ)별 용량은 AWS가 맡고 사용자는 Envoy 설정만 가져오면 됩니다[15]. WebAssembly, Lua, external processing 같은 Envoy 확장도 쓸 수 있고, Amazon EKS에서는 Envoy Gateway와 연결해 Gateway API 리소스로 설정할 수 있습니다[15][16]. Envoy를 직접 띄우고 관리하지 않아도 Envoy의 L7 트래픽 제어를 쓸 수 있게 된 셈입니다.

그런데 Envoy라는 이름을 들으면 Istio 같은 서비스 메시가 자연스럽게 같이 떠오르거든요. 아직 서비스 메시를 도입하지 않았거나 도입을 고민하고 있다면 "ELB for Envoy로 충분한지, 메시까지 필요한지"를 따져 봐야 할 텐데요. 그러려면 먼저 메시가 어떻게 생겼는지 알아야 합니다. 막상 Istio 공식 문서를 펼쳐 보면 개념이 기능별로 흩어져 있어서 큰 그림을 잡기가 쉽지 않았습니다.

그래서 Istio를 처음 보는 분이 1시간 안에 아래 질문에 답할 수 있도록 정리해 보려고 합니다.

  1. 서비스 메시는 무엇을 앱 밖으로 빼내나
  2. Istio는 왜 Envoy를 쓰고, istiod와 Envoy는 어떻게 연결되나
  3. Envoy 설정(listener, route, cluster, endpoint)과 xDS는 무엇인가
  4. VirtualService와 DestinationRule은 Envoy 설정으로 어떻게 바뀌나
  5. 게이트웨이 구간 mTLS와 메시 mTLS는 어떻게 다른가
  6. Istio API와 Kubernetes Gateway API, Envoy Gateway는 어떤 관계인가
  7. EnvoyFilter와 요청 제한은 어떻게 동작하나
  8. ELB for Envoy는 어떤 가치가 있고, 메시와는 어떻게 나눠 쓰나

직접 테스트한 결과가 아니라 Istio, Envoy, Kubernetes Gateway API, AWS 공식 문서를 기준으로 정리한 학습 글입니다. ELB for Envoy로 Istio Ingress Gateway를 직접 옮겨 보며 더 깊이 다룬 글은 마지막 더 볼 만한 자료에 소개해 두었습니다.

이 글을 읽는 법

전체를 다 읽으면 1시간쯤 걸리도록 나눴습니다. 그림 12개를 먼저 훑고 본문을 읽으면 시간이 더 줄어들 거예요.

순서섹션시간다 읽고 나면 할 수 있는 것
0먼저, 서비스 메시가 뭔가5분서비스 메시가 무엇을 앱 밖으로 빼내는지 말할 수 있다
1큰 그림: 데이터 플레인과 컨트롤 플레인8분Istio가 Envoy를 쓰는 이유와 istiod, agent, Envoy가 어떻게 연결되는지 말할 수 있다
2Envoy 기초: listener, route, cluster, endpoint와 xDS8분STRICT_DNS, EDS, 파일 기반 xDS가 무슨 뜻인지 안다
3사이드카는 어떻게 붙고 트래픽은 어떻게 빨려 들어가나5분"백엔드에 프록시가 있다/없다"의 뜻을 안다
4트래픽 관리 CRD: Gateway, VirtualService, DestinationRule10분subset 카나리가 Envoy 설정으로 어떻게 바뀌는지 안다
5보안: 워크로드 신원, PeerAuthentication, AuthorizationPolicy7분게이트웨이 mTLS와 메시 mTLS를 구분한다
6Kubernetes Gateway API와 Envoy Gateway7분Istio 리소스를 Gateway API로 옮기는 표를 읽을 수 있다
7EnvoyFilter와 요청 제한5분Pod별 100 TPS EnvoyFilter를 한 줄씩 읽는다
8ELB for Envoy는 어떤 가치가 있나5분ELB for Envoy가 덜어 주는 운영 일과 메시가 따로 필요한 자리를 구분한다

마지막 자가 점검은 다 읽고 나서 3분 정도 훑어보시면 됩니다.

00

먼저, 서비스 메시가 뭔가

서비스가 여러 개로 나뉘면 서비스끼리 네트워크로 서로 부릅니다. 부를 때마다 챙길 일이 있는데요. 실패하면 다시 보내고(재시도), 오래 걸리면 끊고(타임아웃), 새 버전에는 일부만 보내고(카나리), 통신을 암호화하면서 상대가 누군지 확인하고(mTLS), 몇 번 불렀고 얼마나 걸렸는지 남깁니다(메트릭).

서비스 메시는 이 일을 앱 밖으로 빼낸 인프라 계층입니다. Istio 문서는 서비스 메시를 "애플리케이션에 zero-trust 보안, 관측성, 고급 트래픽 관리 같은 기능을 코드 변경 없이 주는 인프라 계층"이라고 정의합니다[18]. 메시가 없으면 이 기능을 서비스마다 코드나 언어별 라이브러리로 넣어야 하고, 메시를 쓰면 앱 옆의 프록시가 그 일을 맡습니다(추론).

서비스 메시는 재시도, TLS, 메트릭 같은 기능을 앱 코드에서 꺼내 앱 옆의 프록시로 옮긴다메시가 없을 때메시를 쓸 때(Istio)서비스 A (Java)앱 코드 + 라이브러리재시도타임아웃TLS메트릭서비스 B (Go)앱 코드 + 라이브러리재시도타임아웃TLS메트릭서비스마다 같은 기능을코드·라이브러리로 직접 넣음컨트롤 플레인(istiod): 설정과 인증서를 내려줌클라이언트인그레스 게이트웨이Envoy, 메시 입구ELB for Envoy와겹치는 부분Pod A앱+ 프록시(Envoy)Pod B앱+ 프록시(Envoy)앱 코드는 그대로 두고, 앱 옆의 프록시가이 일을 대신함요청설정·인증서Pod아이콘: Kubernetes 아이콘(CC BY 4.0)서비스 메시는 재시도, TLS, 메트릭 같은 기능을 앱 코드에서 꺼내 앱 옆의 프록시로 옮긴다메시가 없을 때서비스 A (Java)재시도타임아웃TLS메트릭서비스 B (Go)재시도타임아웃TLS메트릭서비스마다 같은 기능을 코드에 넣음메시를 쓸 때(Istio)컨트롤 플레인(istiod)인그레스 게이트웨이(Envoy)ELB for Envoy와 겹치는 부분Pod A: 앱 + 프록시Pod B: 앱 + 프록시요청설정·인증서Pod아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 1. 서비스 메시는 재시도, TLS, 메트릭 같은 기능을 앱 코드에서 꺼내 앱 옆의 프록시로 옮긴다.

Istio가 주는 것예
트래픽 관리카나리 배포, A/B 테스트, 로드밸런싱, 장애 복구
보안mTLS 암호화, 정책 관리, 워크로드 신원 기반 접근 제어
관측성메시 안에서 텔레메트리를 만들고 Prometheus, Grafana 같은 도구와 연동

표의 항목은 Istio 소개 페이지에 나온 것입니다[18].

메시는 두 층으로 움직입니다. 각 앱 옆의 프록시(Istio는 Envoy를 씁니다)가 실제 트래픽을 처리하고, 중앙의 컨트롤 플레인이 그 프록시들에 설정을 내려줍니다. 프록시를 Pod 안에 사이드카로 넣는 방식과 ambient 방식이 있습니다[18]. 다음 섹션부터 이 두 층을 하나씩 보겠습니다.

메시 경계에는 밖에서 들어오는 트래픽을 받는 프록시도 있습니다. 이것이 인그레스 게이트웨이이고, Istio는 Gateway 리소스로 이 경계 프록시의 포트와 TLS를 설정합니다[2]. ELB for Envoy와 겹치는 자리가 바로 이 인그레스 게이트웨이인데요. 메시 안쪽 기능(서비스끼리의 mTLS, Pod별 정책)과 어떻게 갈리는지는 ELB for Envoy는 어떤 가치가 있나에서 정리했습니다.

01

큰 그림: 데이터 플레인과 컨트롤 플레인

Istio는 두 부분으로 나뉩니다. 실제 요청을 받아 넘기는 쪽이 데이터 플레인이고, Envoy 프록시들로 이루어집니다. 그 프록시들에게 "이렇게 라우팅하라"는 설정을 내려주는 쪽이 컨트롤 플레인이고, 이것이 istiod입니다[1].

Istio 아키텍처: istiod가 컨트롤 플레인이고, 사이드카와 게이트웨이의 Envoy가 모든 요청이 지나는 데이터 플레인클라이언트메시 밖외부 서비스메시 밖서비스 메시컨트롤 플레인istiod서비스 디스커버리 · 설정(xDS) · 인증서(CA)데이터 플레인인그레스게이트웨이Envoy이그레스게이트웨이Envoy서비스 A앱Envoy(사이드카)서비스 B앱Envoy(사이드카)모든 Envoy에 설정(xDS)과 인증서들어오는 트래픽메시 안 트래픽(mTLS)나가는 트래픽요청은 모두 Envoy를 지나고, istiod는 설정만 내려줌사이드카 모드 기준. ambient 모드에서는 노드별 ztunnel(필요하면 waypoint)이 사이드카 자리를 맡음요청 트래픽설정·인증서Pod아이콘: Kubernetes 아이콘(CC BY 4.0)Istio 아키텍처: istiod가 컨트롤 플레인이고, 사이드카와 게이트웨이의 Envoy가 모든 요청이 지나는 데이터 플레인컨트롤 플레인istiod디스커버리 · 설정(xDS) · 인증서(CA)클라이언트(메시 밖)데이터 플레인: 모든 Envoy인그레스 게이트웨이Envoy서비스 AEnvoy(사이드카)서비스 BEnvoy(사이드카)mTLS이그레스 게이트웨이Envoy외부 서비스(메시 밖)사이드카 모드 기준, ambient는 ztunnel이 대신함요청 트래픽설정·인증서Pod아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 2. Istio 아키텍처: istiod가 컨트롤 플레인이고, 사이드카와 게이트웨이의 Envoy가 모든 요청이 지나는 데이터 플레인.

Istio는 왜 Envoy를 쓰나

Istio의 데이터 플레인 프록시는 Envoy입니다. 정확히는 Istio가 확장한 Envoy이고, C++로 만든 고성능 프록시가 메시 안 모든 서비스의 들어오고 나가는 트래픽을 중간에서 처리합니다[1]. 이유는 세 가지로 보면 됩니다.

  1. 앱 밖에서 따로 도는 프로세스입니다. Envoy는 스스로를 앱 서버 옆에서 따로 실행되는(out-of-process) 프록시라고 설명하고, 그래서 앱 언어와 상관없이 붙일 수 있습니다[19]. Istio가 코드를 다시 쓰지 않고 기존 배포에 기능을 더할 수 있다고 하는 근거가 이 사이드카 모델입니다[1].
  2. 메시에 필요한 기능이 이미 들어 있습니다. Istio 문서가 꼽는 Envoy 기능은 동적 서비스 디스커버리, 로드밸런싱, TLS 종료, HTTP/2·gRPC 프록시, 회로 차단, 헬스 체크, % 단위 트래픽 분할, 장애 주입, 풍부한 메트릭입니다[1].
  3. 설정을 API로 실행 중에 바꿀 수 있습니다. Envoy는 cluster, route, 인증서 같은 설정을 중앙에서 내려받는 계층형 동적 설정 API(xDS)를 갖고 있고[19], route를 바꿔도 진행 중인 요청에 영향을 주지 않습니다[10]. 그래서 istiod가 규칙을 Envoy 설정으로 바꿔 실행 중인 프록시에 바로 내려줄 수 있습니다[1]. Istio 팀은 Istio 1.5 기준으로 컨트롤 플레인 비용 대부분이 이 Envoy xDS API를 제공하는 데 든다고 설명합니다[21].

저는 세 번째가 가장 중요하다고 봤는데요. 데이터 플레인(Envoy)과 컨트롤 플레인(xDS를 내려주는 쪽)이 API 하나로 나뉘어 있기 때문에, Envoy는 AWS가 운영하고 xDS는 다른 곳에서 주는 ELB for Envoy 같은 조합이 가능해집니다(추론).

Istio의 컨트롤 플레인(istiod)과 데이터 플레인(게이트웨이와 Pod마다 있는 istio-proxy 안의 Envoy), 그리고 설정이 흐르는 순서사용자가 하는 일컨트롤 플레인데이터 플레인Istio 리소스GatewayVirtualServiceDestinationRulePeerAuthentication1kubectl applyKubernetes APICRD, Service, Pod 저장istiod바이너리 하나Pilot + Galley + Citadel + 주입기를Istio 1.5에서 하나로 합침서비스 디스커버리규칙 → Envoy 설정 변환CA: mTLS 인증서 서명사이드카 주입 webhook3xDS로 설정 전달gRPC :15012, 인증서도 함께2인그레스 게이트웨이메시 경계의 독립 EnvoyPod Aistio-proxy앱Pod Bistio-proxy앱istio-proxy = Istio agent + Envoy4요청은 Envoy끼리만 오가고, istiod는 요청 경로에 없음(추론).1 적용 → 2 istiod가 Kubernetes API 감시 → 3 모든 Envoy에 xDS → 4 요청사용자 적용 / istiod 감시xDS 설정·인증서요청Pod커스텀 리소스아이콘: Kubernetes 아이콘(CC BY 4.0)Istio의 컨트롤 플레인(istiod)과 데이터 플레인(게이트웨이와 Pod마다 있는 istio-proxy 안의 Envoy), 그리고 설정이 흐르는 순서1 사용자가 Istio 리소스를 적용GatewayVirtualServiceDestinationRulePeerAuthenticationKubernetes API: 저장2 istiod가 감시istiod(컨트롤 플레인)Istio 1.5부터 바이너리 하나서비스 디스커버리규칙 → Envoy 설정 변환CA: mTLS 인증서 서명사이드카 주입 webhook3 xDS :15012데이터 플레인(Envoy)인그레스 게이트웨이(독립 Envoy)Pod Aistio-proxy앱Pod Bistio-proxy앱istio-proxy = Istio agent + Envoy4 요청은 Envoy끼리만 오감xDS 설정·인증서요청커스텀 리소스Pod아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 3. Istio의 컨트롤 플레인(istiod)과 데이터 플레인(게이트웨이와 Pod마다 있는 istio-proxy 안의 Envoy), 그리고 설정이 흐르는 순서.

구성 요소 한눈에 보기

층구성 요소어디서 도나하는 일
컨트롤 플레인istiod클러스터 안 Deployment, 바이너리 하나서비스 디스커버리, 규칙을 Envoy 설정으로 변환해 xDS로 전달, CA로 인증서 발급, 사이드카 주입 webhook
데이터 플레인사이드카 Envoy각 Pod의 istio-proxy 컨테이너Pod로 들어오고 나가는 트래픽 처리
데이터 플레인Istio agent(pilot-agent)같은 istio-proxy 컨테이너Envoy를 띄우고(bootstrap), istiod와의 xDS 연결과 인증서(SDS)를 중계
데이터 플레인인그레스·이그레스 게이트웨이메시 경계의 독립 Envoy메시 밖 트래픽의 출입. Gateway 리소스가 여기에 적용됨

근거는 istiod의 역할[1], agent가 사이드카나 게이트웨이 컨테이너에서 Envoy를 bootstrap한다는 설명[20], 인증서는 agent가 SDS로 Envoy에 넘긴다는 설명[3], Gateway는 사이드카가 아니라 메시 경계에서 따로 도는 Envoy에 적용된다는 설명[2]입니다. ambient 모드에서는 사이드카 대신 노드별 ztunnel과 waypoint가 이 자리를 맡습니다(사이드카는 어떻게 붙고 트래픽은 어떻게 빨려 들어가나에서 다룹니다).

예전 자료에서 Pilot, Galley, Citadel 같은 이름이 나오면, Istio 1.5부터 사이드카 주입기와 함께 istiod 바이너리 하나로 합쳐진 기능이라고 보시면 됩니다[21].

istiod가 하는 일은 세 가지로 기억하면 됩니다[1].

하는 일내용
서비스 디스커버리Kubernetes Service와 Pod 정보를 읽어 어떤 목적지에 어떤 엔드포인트가 있는지 파악
설정 변환·배포VirtualService 같은 상위 수준 규칙을 Envoy 설정으로 바꿔 런타임에 프록시에 내려줌
인증서 관리CA(Certificate Authority) 역할을 하며 데이터 플레인의 mTLS(mutual TLS)용 인증서를 발급

설정은 이렇게 흘러간다

  1. 사용자가 VirtualService 같은 리소스를 kubectl apply로 올리면 Kubernetes API에 저장됩니다.
  2. istiod가 Kubernetes API를 지켜보며 Istio 리소스와 Service, Pod 변화를 읽습니다[1].
  3. istiod가 이를 Envoy 설정(listener, route, cluster, endpoint)으로 바꿉니다[1].
  4. 각 Envoy가 agent를 거쳐 istiod의 xDS(gRPC, 15012 포트)에서 새 설정을 받습니다[5][20].
  5. 실제 요청은 Envoy끼리만 오갑니다. istiod는 설정을 내려줄 뿐 요청 경로에는 없습니다(추론: 데이터 플레인이 모든 트래픽을 중개한다는 설명에 근거)[1].

ELB for Envoy를 이해할 때도 이 구분이 출발점입니다. ELB for Envoy는 데이터 플레인인 Envoy를 AWS가 운영해 주는 서비스이고, 설정은 사용자가 가져오는 Envoy 설정이나 컨트롤 플레인에서 받습니다[15]. EKS에서는 Envoy Gateway가 그 컨트롤 플레인 역할을 합니다[16].

02

Envoy 기초: listener, route, cluster, endpoint와 xDS

ELB for Envoy든 Istio든 Envoy 설정을 다루게 되니까, Envoy 쪽을 조금 더 보겠습니다. Envoy 설정은 요청이 흐르는 순서대로 네 덩어리로 보면 됩니다.

Envoy 설정: listener, route, cluster, endpoint와 각각을 전달하는 xDS설정 출처: gRPC xDS 서버(istiod, Envoy Gateway) 또는 Envoy가 감시하는 파일Envoy 하나를 지나는 요청 하나(왼쪽 → 오른쪽)ListenerLDSRouteRDSClusterCDSEndpointEDS:443 HTTPS필터 체인, 순서대로http_connection_managerlocal_ratelimitrouter (마지막)host api.example.com/orders 매칭order-stable 95%order-canary 5%경로 재작성, 헤더, 재시도order-stableorder-canaryROUND_ROBIN업스트림 TLS연결 풀,회로 차단10.0.1.11:808010.0.1.12:808010.0.2.31:8080실제 Pod·태스크·VM IPSTATIC · STRICT_DNS · EDSSDS인증서 + 개인키Listener TLS의 인증서는 SDS로 받는다(재시작 없이 교체).RDS·CDS 갱신은 진행 중인 요청을 끊지 않고 교체된다.요청 경로설정·순서Secret(인증서, 키)아이콘: Kubernetes 아이콘(CC BY 4.0)Envoy 설정: listener, route, cluster, endpoint와 각각을 전달하는 xDS요청 하나, 위에서 아래로Listener :443LDShttp_connection_managerlocal_ratelimitrouter (마지막)RouteRDS/orders → stable 95%, canary 5%경로 재작성, 헤더, 재시도ClusterCDSorder-stableorder-canaryROUND_ROBIN · TLS · 연결 풀EndpointEDS10.0.1.11:8080, 10.0.1.12:8080STATIC · STRICT_DNS · EDSSDS: 인증서 + 개인키Listener TLS로, 재시작 없이요청 경로Secret아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 4. Envoy 설정: listener, route, cluster, endpoint와 각각을 전달하는 xDS.

설정 덩어리무엇을 정하나이걸 내려주는 xDS
Listener어느 포트로 받을지, 어떤 필터 체인을 거칠지LDS(Listener Discovery Service)
RouteHost, 경로, 헤더를 보고 어느 cluster로 보낼지, 가중치RDS(Route Discovery Service)
Cluster업스트림 목적지 묶음, 로드밸런싱 방식, 연결 풀, TLSCDS(Cluster Discovery Service)
Endpointcluster에 속한 실제 IP:포트 목록EDS(Endpoint Discovery Service)
Secret인증서, 개인키SDS(Secret Discovery Service)

xDS는 이런 "* Discovery Service"들을 묶어 부르는 이름입니다. 모든 리소스를 gRPC 스트림 하나로 순서를 지켜 주고받는 방식이 ADS(Aggregated Discovery Service)이고, ADS는 gRPC로만 지원됩니다. Envoy 문서는 RDS로 바뀐 라우트가 진행 중인 요청에 영향 없이 교체되고, CDS로 cluster가 추가·변경·삭제된다고 설명합니다[10].

엔드포인트를 찾는 방법: STATIC, STRICT_DNS, EDS

cluster가 엔드포인트를 찾는 방식은 여섯 가지가 있는데, 실제로 자주 마주치는 건 세 가지입니다[11].

방식동작언제 쓰나
STATICIP:포트를 설정에 직접 적음대상이 거의 안 바뀔 때. Pod가 바뀌면 사람이 고쳐야 함
STRICT_DNSDNS 이름을 계속 비동기로 다시 조회하고, 응답에 담긴 IP를 모두 개별 호스트로 취급. 재조회 주기 dns_refresh_rate 기본값은 5000msheadless Service 이름을 넣으면 Ready Pod IP가 모두 호스트가 됨
EDSxDS 서버가 엔드포인트 목록을 내려줌. 가중치 같은 속성도 함께Istio, Envoy Gateway가 쓰는 방식. Pod 교체를 바로 반영
Envoy cluster가 엔드포인트를 찾는 방법: STATIC, STRICT_DNS, EDSSTATICSTRICT_DNSEDSEnvoy cluster10.0.1.11, 10.0.1.12설정 파일에 직접 적음Pod 교체새 IP 10.0.1.40누가 설정을 고칠 때까지Envoy는 옛 IP를 계속 씀Envoy clusterapi.order.svc (DNS 이름)headless ServiceclusterIP: None5초*마다 다시 조회Ready Pod응답의 IP 하나 = 호스트 하나xDS 서버istiod, Envoy Gateway, 자체 서버Envoy cluster엔드포인트 + 가중치, locality바뀌면 바로 전달Pod 변경이 바로 반영서버가 EndpointSlice를 감시* Envoy의 dns_refresh_rate 기본값은 5000ms이고, cluster마다 바꿀 수 있음.STRICT_DNS + headless Service + ROUND_ROBIN: Ready Pod 하나가 같은 몫을 받음계산 예시: 한 cluster에 온프레미스 50개 + EKS Pod N개, EKS 몫 = N / (N + 50)EKS Pod 10개16.7%10/60EKS Pod 50개50.0%50/100EKS Pod 300개85.7%300/350EKS 몫온프레미스 몫엔드포인트 조회·전달갱신 안 됨PodService아이콘: Kubernetes 아이콘(CC BY 4.0)Envoy cluster가 엔드포인트를 찾는 방법: STATIC, STRICT_DNS, EDSSTATICIP를 설정에 직접 적음Pod 교체 → Envoy는 옛 IP를 계속 씀누가 파일을 고칠 때까지STRICT_DNSDNS 이름을 5초*마다 다시 조회headless ServiceReady Pod IP 하나 = 호스트EDSxDS 서버가 엔드포인트 목록을 전달가중치, locality 포함Pod 변경이 바로 반영* 기본값 5000ms, cluster마다 설정몫은 Ready Pod 수를 따라감예시: 온프레미스 50 + Pod N, 몫 N/(N+50)EKS 10개16.7%EKS 50개50.0%EKS 300개85.7%갱신 안 됨PodService아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 5. Envoy cluster가 엔드포인트를 찾는 방법: STATIC, STRICT_DNS, EDS.

headless Service(clusterIP: None)는 DNS 조회에 Service IP 대신 Ready Pod IP 목록을 돌려줍니다. 그래서 STRICT_DNS + headless Service + ROUND_ROBIN 조합이면 "Ready Pod 하나당 같은 몫"으로 트래픽이 나뉩니다. 그림 아래쪽 막대는 계산 예시입니다. 온프레미스에서 EKS로 옮기는 중이라 온프레미스 호스트 50개와 EKS Pod를 한 cluster에 같이 넣고 ROUND_ROBIN으로 돌린다고 해 보면, EKS 쪽 몫은 Pod 수 / (Pod 수 + 50)이 됩니다. Pod가 10/50/300개면 16.7%/50%/85.7%이니, Pod 수만 늘려도 트래픽이 EKS 쪽으로 옮겨 갑니다.

파일로도 xDS를 줄 수 있다

xDS 서버가 꼭 있어야 하는 것은 아닙니다. Envoy는 bootstrap의 dynamic_resources에서 LDS, CDS를 파일 경로로 지정해 읽을 수 있습니다. 이때 파일을 제자리에서 수정하면 반영되지 않고, 새 파일을 옮겨(move) 바꿔치기해야 반영됩니다[12]. 직접 해 보실 때 놓치기 쉬운 부분이라 꼭 확인해 보세요.

필터 체인

Listener 안에는 필터 체인이 있고, HTTP 처리는 envoy.filters.network.http_connection_manager(HCM) 안에 HTTP 필터를 순서대로 꽂아서 합니다. 마지막은 항상 업스트림으로 요청을 넘기는 envoy.filters.http.router입니다. 요청 제한 필터(local_ratelimit)를 router 앞에 끼워 넣는 예제는 EnvoyFilter와 요청 제한에서 봅니다.

03

사이드카는 어떻게 붙고 트래픽은 어떻게 빨려 들어가나

사이드카 자동 주입과 iptables로 Pod 트래픽이 istio-proxy를 거치는 구조주입: Pod를 만들 때namespace 라벨istio-injection=enabled1Pod 생성kube-apiserver → webhook2Mutating webhook(istiod)istio-init + istio-proxy 추가3READY 1/1 → 2/2이미 떠 있는 Pod는 재시작4주입 뒤 Pod 안Pod order/apiistio-init: iptables로 모든 트래픽을 프록시로istio-proxyEnvoy + Istio agent:15006 inbound= SIDECAR_INBOUND:15001 outbound= SIDECAR_OUTBOUND:15021 헬스 체크:15090 메트릭앱:8080요청 인입다른 서비스로istiod :15012xDS 설정 + 인증서요청 트래픽설정·인증서단계 순서PodNamespace아이콘: Kubernetes 아이콘(CC BY 4.0)사이드카 자동 주입과 iptables로 Pod 트래픽이 istio-proxy를 거치는 구조주입: Pod를 만들 때1namespace 라벨 istio-injection=enabled2Pod 생성 → kube-apiserver → webhook3webhook이 istio-init + istio-proxy 추가4READY 1/1 → 2/2, 떠 있는 Pod는 재시작Pod 안Pod order/apiistio-init: iptables → 프록시istio-proxy(Envoy + agent):15006 inbound = SIDECAR_INBOUND:15001 outbound = SIDECAR_OUTBOUND:15021 헬스 체크 · :15090 메트릭앱 :8080인입나감istiod :15012 → xDS 설정 + 인증서요청 트래픽단계 순서Pod아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 6. 사이드카 자동 주입과 iptables로 Pod 트래픽이 istio-proxy를 거치는 구조.

주입

namespace에 istio-injection=enabled(또는 리비전 라벨 istio.io/rev=<rev>)를 붙이면, 그 뒤에 새로 만들어지는 Pod에 mutating admission webhook이 istio-proxy 컨테이너를 넣습니다. Deployment 자체는 바뀌지 않고 Pod 생성 시점에 주입되므로, 이미 떠 있는 Pod는 다시 만들어야 사이드카가 붙습니다. 주입된 Pod는 READY가 1/1에서 2/2로 바뀌고, istio-init 컨테이너가 트래픽 리다이렉트를 설정합니다[4].

리다이렉트와 포트

istio-init이 iptables 규칙을 깔면 앱이 보내고 받는 트래픽이 사이드카 Envoy로 돌아갑니다. 알아 둘 포트는 이 정도입니다[5].

포트용도
15001Envoy outbound (앱이 밖으로 보내는 트래픽)
15006Envoy inbound (Pod로 들어오는 트래픽)
15008HBONE(HTTP-Based Overlay Network Environment) mTLS 터널 (ambient)
15021헬스 체크
15090Envoy Prometheus 메트릭
15012istiod의 xDS·CA 서비스(TLS/mTLS)

EnvoyFilter에서 자주 보는 SIDECAR_INBOUND는 15006 쪽, 즉 "Pod로 들어오는 요청을 사이드카가 받는 구간"을 가리킵니다. 게이트웨이가 Pod로 보낸 요청이 앱에 닿기 직전에 Pod 안의 사이드카가 한 번 더 처리할 수 있다는 뜻이고, Pod별 요청 제한 같은 기능이 사이드카에서만 가능한 이유가 여기 있습니다.

ambient는 한 줄만

ambient 모드는 Pod 안에 사이드카를 넣지 않고, 노드마다 L4 프록시 ztunnel을 두고 L7이 필요하면 waypoint 프록시(Envoy)를 둡니다. ztunnel은 mTLS, L4 인가, 텔레메트리를 맡고 HTTP 헤더는 파싱하지 않습니다[6]. 이 글은 사이드카 모드 기준으로 설명하니, ambient는 여기까지만 알아 두셔도 됩니다.

04

트래픽 관리 CRD: Gateway, VirtualService, DestinationRule

Istio를 쓰면 가장 먼저 만나는 리소스들입니다. 각자 무엇을 맡는지부터 보겠습니다[2].

리소스맡는 것Envoy로 치면 (추론)
Gateway (networking.istio.io)메시 경계 프록시의 포트, 프로토콜, TLS, 받을 host. L4~L6Listener
VirtualService경로·헤더 매칭, 어느 목적지로 몇 % 보낼지, 재시도·타임아웃Route
DestinationRule라우팅이 끝난 뒤 목적지에 적용할 정책: subset 정의, 로드밸런싱, 연결 풀, 이상 감지(회로 차단), TLSCluster
ServiceEntry메시 밖 목적지를 Istio 레지스트리에 등록Cluster + Endpoint
Sidecar (리소스)사이드카가 받을 포트, 알아야 할 목적지 범위를 줄임사이드카 설정 크기

"Envoy로 치면" 열은 이해를 돕기 위한 대응입니다. istiod가 정확히 1:1로 번역한다는 뜻은 아닙니다.

Istio Gateway는 VirtualService와 짝으로 동작

Istio의 Gateway는 포트와 TLS까지만 정하고, L7 라우팅은 VirtualService의 gateways 필드로 그 Gateway에 묶어야 동작합니다[2]. 또 Istio Gateway는 이미 배포돼 있는 게이트웨이 Deployment(예: istio-ingressgateway)를 selector로 골라 설정만 합니다[7]. 이 점이 뒤에 나올 Gateway API의 Gateway와 다릅니다.

주문 API를 예로 들어 Istio로 쓰면 대략 이런 모양입니다. stable/canary subset을 라벨로 나누고 95:5로 보냅니다.

yaml
apiVersion: networking.istio.io/v1
kind: Gateway
metadata: {name: public-gw, namespace: istio-ingress}
spec:
  selector: {istio: ingressgateway}        # 이미 떠 있는 게이트웨이 Pod를 고름
  servers:
  - port: {number: 443, name: https, protocol: HTTPS}
    hosts: ["api.example.com"]
    tls: {mode: SIMPLE, credentialName: api-cert}   # TLS Secret 이름. Istio 예시는 게이트웨이가 도는 istio-system에 만듦
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata: {name: order-api, namespace: order}
spec:
  hosts: ["api.example.com"]
  gateways: ["istio-ingress/public-gw"]    # 이 줄이 없으면 Gateway에 붙지 않음
  http:
  - match: [{uri: {prefix: /orders}}]
    route:
    - destination: {host: api.order.svc.cluster.local, subset: stable}
      weight: 95
    - destination: {host: api.order.svc.cluster.local, subset: canary}
      weight: 5
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata: {name: order-api, namespace: order}
spec:
  host: api.order.svc.cluster.local
  trafficPolicy:
    connectionPool: {http: {http1MaxPendingRequests: 100}}
    outlierDetection: {consecutive5xxErrors: 5, interval: 10s, baseEjectionTime: 30s}
  subsets:
  - name: stable
    labels: {version: stable}
  - name: canary
    labels: {version: canary}
istiod가 Gateway, VirtualService, DestinationRule을 Envoy listener, route, cluster로 바꾸는 방식Istio 리소스게이트웨이 Envoy 설정istiod번역Gateway포트 443 HTTPShost api.example.com, TLS 인증서VirtualServicegateways: public-gw/orders → stable 95, canary 5DestinationRulesubset stable: version=stablesubset canary: version=canaryconnectionPool,outlierDetectionListener :443필터 체인 + SDS로 받은 TLSRouteapi.example.com /orders가중치: stable 95, canary 5Cluster, subset마다 하나(추론)+ 연결 풀, 이상 감지api | stableapi | canaryService apinamespace orderService 하나, Pod는라벨로 구분version=stableversion=canaryistiod가 번역subset의 Pod로 가는 트래픽Istio 커스텀 리소스ServicePod아이콘: Kubernetes 아이콘(CC BY 4.0)istiod가 Gateway, VirtualService, DestinationRule을 Envoy listener, route, cluster로 바꾸는 방식istiod가 리소스마다 번역Gateway포트 443, host, TLSistiodListener :443VirtualService/orders → stable 95, canary 5istiodRoute (가중치)DestinationRule라벨 version으로 subsetistiodsubset마다 Cluster(추론)Service api: Service 하나version=stableversion=canaryistiod가 번역Istio 커스텀 리소스ServicePod아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 7. istiod가 Gateway, VirtualService, DestinationRule을 Envoy listener, route, cluster로 바꾸는 방식.

subset은 "같은 Service 안에서 Pod 라벨로 다시 나눈 묶음"입니다. istiod는 subset마다 Envoy cluster를 따로 만들고 각 cluster의 엔드포인트를 라벨로 거릅니다(추론: istioctl proxy-config cluster 출력에서 subset별 cluster를 볼 수 있음). Kubernetes Service 하나만 보는 쪽에서는 이 구분이 보이지 않습니다. 그래서 Gateway API로 옮길 때는 subset을 "라벨이 다른 Service 두 개"로 나눠야 하는데, 이 내용은 Kubernetes Gateway API와 Envoy Gateway에서 다시 나옵니다.

05

보안: 워크로드 신원, PeerAuthentication, AuthorizationPolicy

사이드카가 SPIFFE 인증서를 받는 과정과 게이트웨이 mTLS, 메시 mTLS의 차이사이드카가 신원 인증서를 받는 과정istiod CACSR의 자격을확인하고 서명istio-proxy 컨테이너Istio agent개인키 + CSR 생성만료 전 자동 교체EnvoymTLS에 인증서 사용1 CSR2 서명된 인증서3 SDS신원: spiffe://<trust domain>/ns/order/sa/api서로 다른 두 mTLS 구간클라이언트게이트웨이(Envoy)Pod A 사이드카Pod B 사이드카abcaTLS게이트웨이가서버 인증서를 냄b게이트웨이 mTLS게이트웨이 클라이언트 인증서, 백엔드인증서는 CA와 SAN으로 검증Gateway API: BackendTLSPolicy,Gateway tls.backendc메시 mTLS양쪽이 SPIFFE 인증서를 냄istiod가 발급PeerAuthentication STRICT:mTLS만 받음STRICT로 평문: 거부인증서 흐름요청거부Pod아이콘: Kubernetes 아이콘(CC BY 4.0)사이드카가 SPIFFE 인증서를 받는 과정과 게이트웨이 mTLS, 메시 mTLS의 차이신원 인증서 받기1Istio agent: 개인키 + CSR 생성2istiod CA가 확인하고 서명3Envoy가 agent에게서 받음(SDS)spiffe://<trust domain>/ns/order/sa/api서로 다른 두 mTLS 구간a클라이언트 → 게이트웨이: TLS서버 인증서b게이트웨이 → Pod: 게이트웨이 mTLS클라이언트 인증서, 백엔드는 CA·SAN 검증BackendTLSPolicy, tls.backendcPod ↔ Pod: 메시 mTLSistiod가 발급한 SPIFFE 인증서PeerAuthentication STRICTSTRICT로 평문: 거부인증서 흐름거부아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 8. 사이드카가 SPIFFE 인증서를 받는 과정과 게이트웨이 mTLS, 메시 mTLS의 차이.

신원과 인증서

Istio에서 워크로드 신원은 SPIFFE(Secure Production Identity Framework For Everyone) 형식의 URI입니다: spiffe://<trust domain>/ns/<namespace>/sa/<service account>. 인증서는 이렇게 받습니다[3].

  1. 사이드카 안의 Istio agent가 개인키와 CSR(Certificate Signing Request)을 만들어 istiod로 보냅니다.
  2. istiod의 CA가 CSR에 담긴 자격을 확인하고 서명합니다.
  3. Envoy는 같은 컨테이너의 Istio agent에게서 SDS API로 인증서와 키를 받습니다.
  4. agent가 만료를 보고 자동으로 교체합니다.

이 인증서는 istiod가 서비스 계정 기준으로 발급하는 것이라서, 메시 밖에 있는 프록시는 이 체계에 자동으로 들어오지 않습니다(추론). ELB for Envoy 같은 외부 게이트웨이를 붙일 때 이 점을 꼭 기억해 두세요.

PeerAuthentication: 받는 쪽이 mTLS를 강제하나

모드의미
PERMISSIVEmTLS와 평문을 모두 받음
STRICTmTLS만 받음
DISABLEmTLS 끔

모드를 정하지 않으면 상위 범위를 물려받고, 메시 전체 정책에서 모드가 없으면 PERMISSIVE가 기본입니다[3].

이게 왜 중요하냐면, Pod가 STRICT면 메시 신원 인증서를 내밀지 못하는 클라이언트의 요청은 거부되기 때문입니다. 메시 밖 게이트웨이에서 STRICT Pod로 바로 보내려면 그 구간의 신원과 인증서를 따로 설계해야 합니다(추론).

AuthorizationPolicy: 누가 들어올 수 있나

AuthorizationPolicy는 selector로 대상 워크로드를 고르고, from.source.principals(호출자 SPIFFE 신원), 메서드·경로, when 조건으로 규칙을 씁니다. 동작은 CUSTOM, DENY, ALLOW 세 가지이고 이 순서로 평가합니다[3]. principal 기반 규칙은 mTLS로 확인한 신원이 있어야 의미가 있으므로, 메시 mTLS와 짝으로 봐야 합니다(추론).

게이트웨이 구간 mTLS와 메시 mTLS는 다르다

mTLS라는 말이 두 군데에서 나와서 헷갈리기 쉬운데요, 이렇게 나눠 보면 됩니다.

구분누가 인증서를 내나누가 관리하나
게이트웨이 ↔ 백엔드 mTLS게이트웨이가 클라이언트 인증서를 내고, 백엔드 서버 인증서를 CA와 SAN(Subject Alternative Name)으로 검증게이트웨이 설정 (Gateway API에서는 BackendTLSPolicy + Gateway의 클라이언트 인증서)
메시 mTLS사이드카끼리 SPIFFE 인증서를 서로 냄istiod CA, PeerAuthentication

게이트웨이 구간 설정은 Kubernetes Gateway API와 Envoy Gateway의 BackendTLSPolicy에서 다시 봅니다[13].

06

Kubernetes Gateway API와 Envoy Gateway

Gateway API의 Gateway는 "설정 + 배포"

Istio는 Kubernetes Gateway API를 지원하고, 앞으로 트래픽 관리의 기본 API로 삼겠다고 밝히고 있습니다. Istio 문서가 짚는 차이는 세 가지입니다[7].

  1. Istio Gateway는 미리 배포된 게이트웨이를 설정만 하지만, Gateway API Gateway는 게이트웨이를 설정하고 배포까지 합니다. gatewayClassName: istio인 Gateway를 만들면 <Gateway 이름>-<GatewayClass 이름>으로 Deployment와 Service가 자동 생성됩니다.
  2. VirtualService 하나에 모든 프로토콜을 담던 것을 HTTPRoute, TCPRoute처럼 프로토콜별 리소스로 나눕니다.
  3. Gateway API가 Istio 기능을 100% 덮지는 않습니다.
Istio Gateway는 미리 설치된 게이트웨이를 설정만 하고, Gateway API Gateway는 배포까지 한다Istio APIKubernetes Gateway APIDeployment istio-ingressgateway미리 설치돼 있음Gatewayselector: istio=ingressgatewayVirtualServicegateways: [public-gw], weight 95/5DestinationRule + Service 하나Pod 라벨로 subset stable / canary설정만 함붙음GatewaygatewayClassName: istioDeployment + Service gateway-istio컨트롤러가 자동 생성HTTPRouteparentRefs: gateway, backendRefs weightService api-stable 95Service api-canary 5subset 대신 Service를 나눔배포까지붙음컨트롤러가 배포설정·연결트래픽 가중치Deployment커스텀 리소스Service아이콘: Kubernetes 아이콘(CC BY 4.0)Istio Gateway는 미리 설치된 게이트웨이를 설정만 하고, Gateway API Gateway는 배포까지 한다Istio APIDeployment istio-ingressgateway미리 설치Gateway (selector)설정만 함VirtualService (gateways)DestinationRule의 subset으로Kubernetes Gateway APIGateway (gatewayClassName: istio)Deployment + Service까지 생성HTTPRoute (parentRefs)backendRefs에 weightapi-stable 95api-canary 5subset 대신 Service를 나눔Deployment커스텀 리소스아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 9. Istio Gateway는 미리 설치된 게이트웨이를 설정만 하고, Gateway API Gateway는 배포까지 한다.

yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata: {name: gateway, namespace: istio-ingress}
spec:
  gatewayClassName: istio
  listeners:
  - name: default
    hostname: "*.example.com"
    port: 80
    protocol: HTTP
    allowedRoutes: {namespaces: {from: All}}
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata: {name: http, namespace: default}
spec:
  parentRefs: [{name: gateway, namespace: istio-ingress}]
  hostnames: ["httpbin.example.com"]
  rules:
  - matches: [{path: {type: PathPrefix, value: /get}}]
    backendRefs: [{name: httpbin, port: 8000}]

이 예시는 Istio 문서의 것입니다[7]. 가중치는 backendRefs마다 weight를 주는데, 대상이 Service라서 앞에서 본 subset 대신 Service를 둘로 나눕니다. Blue/Green을 100:0 → 95:5 → 50:50 → 0:100으로 옮기는 식의 전환도 이 방식으로 합니다.

백엔드 TLS: BackendTLSPolicy와 클라이언트 인증서

BackendTLSPolicy는 Service에 붙여서, 게이트웨이가 백엔드에 붙을 때 쓸 SNI와 백엔드 인증서 검증 방법을 정합니다. hostname과 caCertificateRefs(또는 wellKnownCACertificates)가 필요하고, Standard Channel에는 v1.4.0부터 들어왔습니다. 게이트웨이가 백엔드에 내밀 클라이언트 인증서는 Gateway의 tls.backend.clientCertificateRef로 정하고, 이것은 그 Gateway가 맺는 모든 업스트림 연결에 적용됩니다. Standard Channel에는 v1.5.0부터 있습니다[13].

Envoy Gateway: Gateway API를 Envoy로 번역하는 컨트롤 플레인

Envoy Gateway는 Gateway API 리소스를 읽어 Envoy xDS로 바꿔 주는 컨트롤 플레인입니다. Istio의 istiod와 같은 자리에 있다고 보면 됩니다(추론). Gateway API 표준에 없는 기능은 자체 정책 리소스로 채웁니다[14].

Envoy Gateway 리소스맡는 것
BackendTrafficPolicy게이트웨이 → 백엔드 구간: 회로 차단, 로컬·글로벌 요청 제한, 재시도, 로드밸런싱, 헬스 체크
ClientTrafficPolicy클라이언트 → 게이트웨이 구간: 연결 동작, 타임아웃, TLS
SecurityPolicyJWT, CORS, IP 필터 같은 인증·인가
EnvoyProxyEnvoy 배포 방식, 텔레메트리, 인프라 provider 설정

ELB for Envoy는 이 구조의 어디에 들어가나

ELB for Envoy의 Kubernetes 통합은 이 구조 위에 있습니다. Envoy Gateway가 클러스터 안에서 xDS 컨트롤 플레인으로 돌고, remote infrastructure provider가 ELB for Envoy API를 불러 프록시를 만들며, 프록시 fleet은 AWS가 운영합니다. 이미 Envoy Gateway를 쓰고 있다면 Gateway API 리소스와 컨트롤 플레인은 그대로 두고 Envoy가 도는 위치만 바뀝니다[16]. Gateway를 ELB for Envoy에 올리려면 ELBProxyConfiguration 리소스를 붙이고, 여기에 프록시의 IAM 역할, 서브넷, 보안 그룹을 적습니다. AWS 문서는 이 통합을 초기 개발 단계(API 버전 v1alpha1)로 표시하고 있습니다[17]. ELB for Envoy는 2026-11-25에 GA됐고, 도쿄를 포함한 14개 리전에서 쓸 수 있습니다[15].

EKS와 ELB for Envoy: Envoy Gateway는 클러스터 안 xDS 컨트롤 플레인으로 남고 Envoy fleet은 AWS가 운영요청 경로(예시)CloudFront내부 NLBELB for EnvoyEC2ECSEKS백엔드에는 기본적으로 프록시 없음같은 프록시EKS에서의 설정 경로Amazon EKS 클러스터GatewayHTTPRouteBackendTLSPolicyBackendTrafficPolicyELBProxyConfigurationGateway API · Envoy Gateway ·AWS 확장 리소스Envoy GatewayxDS 컨트롤 플레인remote infrastructureproviderIstio CRD는 읽지 않음:VirtualService, DestinationRule, EnvoyFilterELB for Envoy 계정프록시 fleet은 AWS가 운영ELB for Envoy APIEnvoyEnvoyEnvoy패치, 확장, AZ 용량은AWS가 맡음생성xDS요청xDS 설정API 호출·참조Amazon CloudFrontNetwork Load BalancerElastic Load BalancingAWS 계정아이콘: AWS Architecture IconsEKS와 ELB for Envoy: Envoy Gateway는 클러스터 안 xDS 컨트롤 플레인으로 남고 Envoy fleet은 AWS가 운영요청 경로(예시)CloudFront내부 NLBELB for EnvoyEC2ECSEKSEKS에서의 설정 경로Amazon EKS 클러스터GatewayHTTPRouteBackendTLSPolicyBackendTrafficPolicyELBProxyConfigurationEnvoy Gateway: xDS 컨트롤 플레인+ remote infrastructure provider생성xDSELB for Envoy 계정(AWS)EnvoyEnvoyEnvoyIstio CRD는 읽지 않음VirtualService, DestinationRule, EnvoyFilter요청xDS 설정Elastic Load BalancingAWS 계정아이콘: AWS Architecture Icons

그림 10. EKS와 ELB for Envoy: Envoy Gateway는 클러스터 안 xDS 컨트롤 플레인으로 남고 Envoy fleet은 AWS가 운영.

Istio → Gateway API 대응표

메시를 쓰다가 게이트웨이를 Gateway API로 옮긴다면 이 표를 옆에 두고 보시면 됩니다[2][7][13][14].

IstioGateway API / Envoy Gateway메모
Gateway (포트, host, TLS)Gateway의 listenersGateway API 쪽은 배포까지 함
VirtualService (경로, 헤더, 가중치)HTTPRoute가중치 대상이 subset이 아니라 Service
DestinationRule subset라벨이 다른 Service로 분리Pod 라벨 카나리는 그대로 안 옮겨짐
DestinationRule 연결 풀, 이상 감지BackendTrafficPolicyEnvoy Gateway 확장
DestinationRule TLS 설정BackendTLSPolicy + Gateway 클라이언트 인증서
EnvoyFilter일반적인 대응 없음Pod 안 사이드카에 거는 설정은 옮길 수 없음
PeerAuthentication, AuthorizationPolicy대응 없음 (메시 기능)메시를 계속 쓰면 Istio에 남음

07

EnvoyFilter와 요청 제한

EnvoyFilter는 비상구

EnvoyFilter는 istiod가 만든 Envoy 설정을 직접 패치하는 리소스입니다. Istio 문서는 이 API가 Istio 내부 구현과 Envoy xDS API에 깊이 묶여 있고, 프록시 버전을 올릴 때마다 폐기된 필드가 없는지 살펴야 하며, 여러 EnvoyFilter가 충돌하면 동작이 정의되지 않는다고 경고합니다. 패치 위치는 context(SIDECAR_INBOUND, SIDECAR_OUTBOUND, GATEWAY, ANY)와 applyTo(HTTP_FILTER, CLUSTER, HTTP_ROUTE 등)로 고르고, MERGE, INSERT_BEFORE, REPLACE 같은 동작으로 바꿉니다[8].

로컬 제한과 글로벌 제한

로컬 요청 제한은 프록시마다 버킷을 두고, 글로벌 요청 제한은 rate limit service의 카운터 하나를 나눠 쓴다로컬: 프록시마다 토큰 버킷글로벌: 공유 카운터 하나order/api로 가는 요청Pod A사이드카버킷100 / 초Pod B사이드카버킷100 / 초Pod C사이드카버킷100 / 초Pod마다 따로 채움: Pod 3개 ≈ 300/초Istio: EnvoyFilter, SIDECAR_INBOUND,router 앞에 local_ratelimit한도 초과 → 429Envoy넘기기 전에 물어봄Rate limit servicegRPC · 공유 카운트descriptor: path=/orders, 한도 3EC2ECSEKS요청 1허용요청 2허용요청 3허용요청 4공유 한도 초과 → 429목적지 셋이 한도 하나를 나눠 씀요청쿼터 확인(gRPC)PodAmazon EC2Amazon ECSAmazon EKS아이콘: AWS Architecture Icons, Kubernetes 아이콘(CC BY 4.0)로컬 요청 제한은 프록시마다 버킷을 두고, 글로벌 요청 제한은 rate limit service의 카운터 하나를 나눠 쓴다로컬: 프록시마다 버킷Pod A버킷100/초Pod B버킷100/초Pod C버킷100/초Pod 3개 ≈ 전체 300/초EnvoyFilter, SIDECAR_INBOUND한도 초과 → 429글로벌: 공유 카운터 하나EnvoyRate limitservice (gRPC)한도 3, EC2·ECS·EKS가 나눠 씀요청 1허용요청 2허용요청 3허용요청 4429쿼터 확인(gRPC)Pod아이콘: Kubernetes 아이콘(CC BY 4.0)

그림 11. 로컬 요청 제한은 프록시마다 버킷을 두고, 글로벌 요청 제한은 rate limit service의 카운터 하나를 나눠 쓴다.

종류동작어디서 쓰나
로컬 (local_ratelimit)프록시 인스턴스마다 토큰 버킷을 따로 가짐. 다른 서비스를 부르지 않음사이드카에 걸면 Pod마다 독립 한도, 게이트웨이에 걸면 게이트웨이 단위 한도
글로벌외부 rate limit 서비스에 gRPC로 쿼터를 물어봄. descriptor로 요청을 분류여러 목적지가 한도 하나를 공유. ELB for Envoy의 EKS 통합에서는 지원 안 함

Istio 문서도 로컬 제한을 "다른 서비스를 부르지 않고 서비스 인스턴스별로" 거는 것으로, 글로벌 제한을 gRPC rate limit 서비스에서 쿼터를 받는 것으로 설명합니다[9]. ELB for Envoy의 Envoy Gateway 통합에서는 글로벌 요청 제한을 지원하지 않으니 로컬 요청 제한을 쓰라고 AWS 문서에 적혀 있습니다[17].

Pod별 100 TPS EnvoyFilter 읽기

"order/api의 Pod마다 초당 100건까지만 받기"를 사이드카로 거는 예제입니다. 줄마다 주석을 달아 두었습니다.

yaml
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata: {name: api-inbound-100rps, namespace: order}
spec:
  workloadSelector:
    labels: {app: api}                 # order namespace의 app=api Pod 사이드카에만
  configPatches:
    - applyTo: HTTP_FILTER             # HTTP 필터 목록을 건드림
      match:
        context: SIDECAR_INBOUND       # Pod로 들어오는 쪽 (15006)
        listener:
          portNumber: 8080             # 앱 포트 8080으로 오는 요청
          filterChain:
            filter:
              name: envoy.filters.network.http_connection_manager
              subFilter: {name: envoy.filters.http.router}
      patch:
        operation: INSERT_BEFORE       # router 바로 앞에 끼움
        value:
          name: envoy.filters.http.local_ratelimit
          typed_config:
            "@type": type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
            stat_prefix: order_api_inbound
            token_bucket:              # 1초마다 100개 채움, 최대 100개
              max_tokens: 100
              tokens_per_fill: 100
              fill_interval: 1s
            filter_enabled:            # 100% 요청에 대해 계산하고
              default_value: {numerator: 100, denominator: HUNDRED}
            filter_enforced:           # 100% 실제로 거부(429)
              default_value: {numerator: 100, denominator: HUNDRED}
            response_headers_to_add:
              - header: {key: x-order-pod-limit, value: "true"}
                append_action: OVERWRITE_IF_EXISTS_OR_ADD

토큰 버킷이 사이드카마다 따로 있으니 Pod가 늘면 서비스 전체 한도도 같이 늘어납니다. 그리고 이 설정은 Pod 안 사이드카에 붙는 것이라서, Pod 밖에 있는 게이트웨이(ELB for Envoy 포함)로는 옮길 수 없습니다.

08

ELB for Envoy는 어떤 가치가 있나

앞에서 본 것처럼 Envoy는 할 줄 아는 게 많은 프록시지만, 직접 운영하려면 챙길 일도 그만큼 많습니다. ELB for Envoy는 이 운영을 AWS에 맡기는 서비스예요. 데이터 플레인과 컨트롤 플레인으로 나눠 보면, Envoy가 도는 곳만 AWS로 옮겨 가고 설정은 지금처럼 사용자가 내려줍니다[15].

직접 하던 운영을 AWS가 가져간다

AWS는 Envoy를 직접 운영하는 팀이 업그레이드, 보안 패치, 가용 영역(AZ)별 용량까지 떠안고 있다고 보고, ELB for Envoy가 이 일을 가져간다고 설명합니다[15]. EKS에서도 마찬가지예요. Envoy Gateway는 보통 Envoy를 클러스터 안 Pod로 띄우기 때문에 크기 산정, 확장, 업그레이드, CVE 패치를 모두 직접 해야 하거든요. ELB for Envoy를 붙이면 이 Envoy를 AWS가 대신 돌립니다[17].

일Envoy를 직접 운영하면ELB for Envoy를 쓰면
업그레이드, 보안 패치직접AWS[15]
AZ별 용량, 확장직접(replica, autoscaling 설정)AWS. Kubernetes replica·autoscaling 설정은 쓰지 않음[15][17]
격리직접 설계로드밸런서마다 전용 EC2 인스턴스, Nitro 하드웨어 격리[15]
서브넷, 보안 그룹직접EKS 통합 컨트롤러가 서브넷은 찾거나 지정한 것을 쓰고, 보안 그룹은 만들어 관리[17]
라우팅·정책Gateway API + Envoy Gateway그대로 Gateway API + Envoy Gateway[17]

격리는 AWS 발표에 따르면 Envoy에서 zero-day 취약점이 나와도 그 로드밸런서 안에서 끝나는 구조입니다[15].

Envoy의 확장성은 그대로

관리형이라고 쓸 수 있는 기능이 줄지는 않습니다. 쓰던 Envoy 설정, 확장, 컨트롤 플레인을 그대로 가져올 수 있고, WebAssembly, Lua, external processing으로 직접 만든 로직도 넣을 수 있어요[15]. AWS가 꼽는 쓰임새는 세 가지입니다[15].

  • 사용자 정의 인증, 요청 변환, 고급 라우팅처럼 Envoy의 확장성이 필요한 워크로드
  • Kubernetes 인그레스
  • 직접 운영하던 Envoy에서 옮겨 오는 경우

EKS에서 달라지는 점

EKS에서는 Envoy Gateway가 클러스터 안에서 계속 xDS를 내려주고, 프록시만 ELB for Envoy 쪽에서 돕니다(ELB for Envoy는 이 구조의 어디에 들어가나). 프록시가 클러스터 밖에 있어서 아래 네 가지가 달라집니다[17].

  • Pod IP가 VPC 안에서 라우팅돼야 합니다(예: Amazon VPC CNI).
  • 접근 로그는 파일 대신 OpenTelemetry나 ALS(Access Log Service) 같은 네트워크 sink로 보내야 합니다.
  • 글로벌 요청 제한은 지원하지 않아서 로컬 요청 제한을 써야 합니다.
  • 이 통합은 아직 초기 개발 단계(v1alpha1)입니다.

메시와는 어떻게 나눠 쓰나

Istio 구조에 대 보면 ELB for Envoy의 자리는 메시 경계의 인그레스 게이트웨이입니다. Pod 옆의 사이드카나 노드의 ztunnel을 대신하지는 않아요(추론).

기능게이트웨이(ELB for Envoy)에서메시(사이드카·ztunnel)가 있어야
경로·헤더 라우팅, 가중치 분산가능(Route 설정)서비스끼리 호출할 때도 같은 제어가 필요하면
TLS, 게이트웨이 → 백엔드 mTLS가능(BackendTLSPolicy + Gateway 클라이언트 인증서)[13]서비스끼리 SPIFFE 신원으로 mTLS를 하려면[3]
요청 제한게이트웨이 단위 로컬 제한. 글로벌 제한은 지원 안 함[17]Pod마다 따로 거는 한도(사이드카 SIDECAR_INBOUND)[8]
워크로드 신원, AuthorizationPolicy해당 없음istiod CA와 사이드카가 있어야 함[3]
Istio CRD(VirtualService, DestinationRule, EnvoyFilter)Gateway API나 Envoy 설정으로 바꿔서 줘야 함Istio CRD를 Envoy 설정으로 바꾸는 건 istiod의 일[1]
ELB for Envoy가 맡는 자리와 메시가 있어야 하는 자리ELB for Envoy(인그레스 게이트웨이)메시가 있어야(사이드카·ztunnel)경로·헤더 라우팅, 가중치TLS, 게이트웨이-백엔드 mTLS게이트웨이 단위 로컬 요청 제한Wasm, Lua, external processing패치·확장·AZ별 용량은 AWS가서비스 간 mTLS(SPIFFE 신원)서비스 간 인가(AuthorizationPolicy)Pod별 한도(사이드카)서비스끼리 호출의 라우팅·재시도Istio CRD 해석(istiod)ELB for Envoy는 입구의 데이터 플레인을 맡고, 클러스터 안 서비스끼리의 트래픽은 메시의 일AWS ELB for Envoy 문서와 Istio 문서를 바탕으로 정리ELB for Envoy가 맡는 자리와 메시가 있어야 하는 자리ELB for Envoy(인그레스 게이트웨이)경로·헤더 라우팅, 가중치TLS, 게이트웨이-백엔드 mTLS게이트웨이 단위 로컬 요청 제한Wasm, Lua, external processing패치·확장·AZ별 용량은 AWS가메시가 있어야(사이드카·ztunnel)서비스 간 mTLS(SPIFFE 신원)서비스 간 인가(AuthorizationPolicy)Pod별 한도(사이드카)서비스끼리 호출의 라우팅·재시도Istio CRD 해석(istiod)AWS·Istio 문서를 바탕으로 정리

그림 12. ELB for Envoy가 맡는 자리와 메시가 있어야 하는 자리.

제 생각을 정리하면 이렇습니다(추론). 아직 메시가 없고, 당장 필요한 게 클러스터 입구의 L7 라우팅, 가중치 배포, 백엔드 mTLS, 게이트웨이 단위 요청 제한 정도라면 ELB for Envoy와 Envoy Gateway로 시작해 볼 만합니다. Envoy를 직접 운영하는 부담 없이요. 서비스끼리의 mTLS와 워크로드 신원, 서비스 간 인가, Pod 단위 정책이 필요해지면 그때가 메시를 진지하게 볼 시점이라고 생각합니다. Istio도 Gateway API를 지원하니, 그동안 익힌 Gateway API 라우팅은 메시를 도입한 뒤에도 그대로 쓸 수 있습니다.

ELB for Envoy로 Istio Ingress Gateway 기능을 하나씩 옮겨 보고 측정까지 한 글은 더 볼 만한 자료에 소개해 두었습니다. 실제 이전을 고민하신다면 이어서 읽어 보세요.

자가 점검

아래 질문에 답이 바로 나오면 이 글의 목표는 이룬 겁니다.

1. ELB for Envoy가 VirtualService를 그대로 읽지 못하는 이유는?

답: VirtualService를 Envoy 설정으로 바꾸는 것은 istiod(컨트롤 플레인)의 일이고, ELB for Envoy는 Envoy(데이터 플레인)를 운영해 주는 서비스이기 때문입니다. 설정은 xDS(자체 컨트롤 플레인이나 Envoy Gateway)로 따로 줘야 합니다.

2. headless Service + STRICT_DNS로 왜 Pod 수에 비례해 나뉘나?

답: headless Service의 DNS 응답은 Ready Pod IP 목록이고, STRICT_DNS는 응답의 IP를 모두 개별 호스트로 넣습니다. 그 위에서 ROUND_ROBIN을 돌리면 호스트(=Pod)마다 같은 몫을 받습니다.

3. DestinationRule subset 카나리를 Gateway API로 옮길 때 무엇을 바꿔야 하나?

답: HTTPRoute의 가중치 대상은 Service이므로, stable/canary를 라벨이 다른 Service 두 개로 나누고 backendRefs에 weight를 줍니다.

4. Pod가 PeerAuthentication STRICT일 때 메시 밖 게이트웨이가 평문으로 보내면?

답: STRICT는 mTLS만 받으므로 거부됩니다. 게이트웨이 구간 mTLS(BackendTLSPolicy 등)는 메시 SPIFFE 신원과 다른 체계라서 따로 맞춰야 합니다.

5. 사이드카 local_ratelimit 100/초를 Pod 3개에 걸면 서비스 전체 한도는?

답: 토큰 버킷이 Pod마다 따로 있으니 대략 300/초입니다. 서비스 전체를 하나의 한도로 묶으려면 글로벌 제한(외부 rate limit 서비스)이 필요합니다.

6. ELB for Envoy를 쓰면 Envoy 운영에서 무엇이 사용자 손을 떠나나?

답: 업그레이드와 보안 패치, AZ별 용량과 확장을 AWS가 맡습니다. 라우팅과 정책은 여전히 Gateway API와 Envoy Gateway로 사용자가 정합니다.

이 글에서 다루지 않은 것

1시간 분량에 맞추느라 아래 내용은 뺐습니다. 메시 도입을 실제로 검토하신다면 다음으로 보시면 좋을 주제들입니다.

주제한 줄 설명
ambient 모드 자세히노드별 ztunnel, waypoint, HBONE 터널이 사이드카를 어떻게 대신하는지
멀티 클러스터여러 클러스터를 메시 하나로 묶는 구성
egress gateway 상세메시 밖으로 나가는 트래픽을 한곳으로 모으는 설정
업그레이드istiod 리비전을 나란히 띄워 옮기는 방식
관측 도구Prometheus, Grafana 같은 도구와 연결하는 방법

더 볼 만한 자료

  • ELB for Envoy가 Istio Ingress Gateway를 대체할 수 있을까? (atomai 블로그): ELB for Envoy를 직접 띄워 Istio Ingress Gateway의 기능(가중치, mTLS, 요청 제한, xDS 서버 연결 등)을 하나씩 옮겨 보고 측정한 글입니다. 실제 이전을 고민하신다면 이 글 다음으로 읽어 보세요.
  • Istio: Getting Started: 직접 Istio를 설치해서 사이드카와 게이트웨이를 붙여 보는 공식 튜토리얼입니다.
  • Envoy Gateway: Quickstart: Gateway API로 Envoy Gateway를 띄워 보는 공식 튜토리얼입니다.

참고 자료