CNCF & Networking

Kubernetes Gateway API: Istio, Envoy & Cilium 2026

Hệ sinh thái Gateway API trong Kubernetes — tối ưu networking, bảo mật và hiệu suất giai đoạn 2026 🚀

03/07/2026 20 phút đọc Võ Đào Huy Hoàng

1. Giới Thiệu

Năm 2026, Kubernetes Gateway API đã trở thành tiêu chuẩn de facto cho việc quản lý traffic vào cluster Kubernetes 🛡️. Thay thế hoàn toàn Ingress truyền thống, Gateway API mang đến mô hình tách biệt rõ ràng giữa infrastructure (platform team) và routing rules (application team).

Ba ông lớn trong hệ sinh thái này: Istio, Envoy Proxy, và Cilium. Mỗi giải pháp mang triết lý thiết kế khác nhau nhưng đều implement đầy đủ Gateway API specification.

🎯 Mục tiêu bài viết: Cung cấp cái nhìn toàn diện về Gateway API 2026, so sánh 3 giải pháp hàng đầu, hướng dẫn cấu hình thực tế với YAML/Helm, và giúp bạn chọn giải pháp phù hợp cho production workload.
v1.1
Gateway API Version
GA
HTTPRoute Status
3+
Major Implementations
10x
eBPF Speedup

2. Tổng Quan Gateway API

Gateway API (gateway-api.sigs.k8s.io) là dự án CNCF Graduated năm 2024, cung cấp API chuẩn hóa, mở rộng và expressive cho traffic management trong Kubernetes. Khác với Ingress chỉ hỗ trợ HTTP/HTTPS cơ bản, Gateway API hỗ trợ TCP, UDP, TLS, GRPC và nhiều protocol khác.

Lợi Ích So với Ingress Trước Đây

  • Role-based design — Tách biệt GatewayClass (infra), Gateway (platform), HTTPRoute/GRPCRoute (app team) 🎭
  • Multi-protocol — Hỗ trợ HTTP, HTTPS, TCP, UDP, TLS, GRPC, WebSocket native 📡
  • ExtensibilityExtensionRef, BackendRef cho custom filters, auth, rate-limiting 🔧
  • Status conditions — Rich status reporting cho debugging và GitOps 🔍
  • Conformance testing — Suite test chuẩn đảm bảo implementation tương thích ✅
  • Namespace delegationReferenceGrant cho cross-namespace routing 🔗

Các Resource Chính

🏗️
GatewayClass
(Cluster-scoped)
🚪
Gateway
(Namespaced)
🛣️
HTTPRoute/
GRPCRoute/TLSRoute
🎯
Service/
BackendRef
# 1. GatewayClass - Infrastructure team defines apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: istio-gateway spec: controllerName: istio.io/gateway-controller description: "Istio managed GatewayClass" parametersRef: group: istio.io kind: IstioGatewayClassParams name: production-params --- # 2. Gateway - Platform team deploys apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: public-gateway namespace: istio-system annotations: networking.istio.io/service-type: LoadBalancer spec: gatewayClassName: istio-gateway listeners: - name: http protocol: HTTP port: 80 allowedRoutes: namespaces: from: All - name: https protocol: HTTPS port: 443 tls: certificateRefs: - kind: Secret name: wildcard-tls-cert allowedRoutes: namespaces: from: All --- # 3. HTTPRoute - Application team owns apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: api-route namespace: production spec: parentRefs: - name: public-gateway namespace: istio-system hostnames: - "api.example.com" rules: - matches: - path: type: PathPrefix value: /v1 backendRefs: - name: api-v1-service port: 80 weight: 90 - name: api-v2-canary port: 80 weight: 10 filters: - type: RequestHeaderModifier requestHeaderModifier: add: - name: x-gateway-api value: "true" - type: RequestRedirect requestRedirect: scheme: https statusCode: 301

3. Istio & Gateway API 🛡️

Istio là service mesh đầy đủ nhất, implement Gateway API từ phiên bản 1.18+ (GA ở 1.20). Điểm mạnh: tích hợp sâu với Sidecar Envoy, mTLS tự động, traffic splitting, fault injection, và observability toàn diện.

Cấu Hình Istio Gateway

Cài đặt Istio với Gateway API enabled:

# IstioOperator với Gateway API support apiVersion: install.istio.io/v1alpha1 kind: IstioOperator metadata: name: istio-gateway-api namespace: istio-system spec: profile: default meshConfig: enableAutoMtls: true defaultConfig: proxyMetadata: ISTIO_META_ENABLE_GATEWAY_API: "true" components: ingressGateways: - name: istio-ingressgateway enabled: true k8s: service: type: LoadBalancer ports: - port: 80 targetPort: 8080 name: http2 - port: 443 targetPort: 8443 name: https hpaSpec: minReplicas: 2 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 70
# Helm values cho Istio Gateway API production global: meshID: mesh-1 multiCluster: clusterName: cluster-prod-sg network: network-sg pilot: env: PILOT_ENABLE_GATEWAY_API: true PILOT_ENABLE_GATEWAY_API_DEPLOYMENT_CONTROLLER: true PILOT_ENABLE_GATEWAY_API_STATUS: true gateways: istio-ingressgateway: type: LoadBalancer ports: - port: 80 targetPort: 8080 name: http2 - port: 443 targetPort: 8443 name: https - port: 15443 targetPort: 15443 name: tls autoscaleEnabled: true autoscaleMin: 2 autoscaleMax: 20 resources: requests: cpu: 500m memory: 512Mi limits: cpu: 2000m memory: 2Gi

Traffic Management Nâng Cao

Istio mở rộng Gateway API với IstioExtensionEnvoyFilter cho khả năng vượt trội:

# TrafficSplit cho Canary Deployment (Istio Extension) apiVersion: networking.istio.io/v1beta1 kind: VirtualService metadata: name: api-canary namespace: production spec: hosts: - "api.example.com" gateways: - istio-system/public-gateway http: - match: - headers: x-canary: exact: "true" route: - destination: host: api-v2-canary.production.svc.cluster.local port: number: 80 weight: 100 - route: - destination: host: api-v1.production.svc.cluster.local port: number: 80 weight: 90 - destination: host: api-v2-canary.production.svc.cluster.local port: number: 80 weight: 10 fault: delay: percentage: value: 0.1 fixedDelay: 5s abort: percentage: value: 0.1 httpStatus: 503 retries: attempts: 3 perTryTimeout: 2s retryOn: connect-failure,refused-stream,unavailable,cancelled,retriable-status-codes timeout: 10s
✨ Istio Gateway API Highlights:
  • mTLS Auto — Zero-config mutual TLS giữa services
  • AuthorizationPolicy — Fine-grained RBAC cho traffic
  • Telemetry API — Metrics, logs, traces tự động
  • WASM Support — Chạy custom logic trong Envoy sidecar
  • Multi-cluster — Istio Multi-Cluster Mesh Federation

4. Envoy Proxy & L7 Routing ⚡

Envoy Proxy là data plane hiệu suất cao, được viết bằng C++, là nền tảng của Istio, Contour, Gloo, và nhiều ingress controller khác. Năm 2026, Envoy v1.30+ hỗ trợ đầy đủ Gateway API thông qua Gateway API IR (Intermediate Representation) và xDS protocol.

EnvoyFilter & WebAssembly (Wasm)

EnvoyFilter cho phép tùy chỉnh behavior của Envoy data plane mà không cần recompile:

# EnvoyFilter cho JWT Authentication (Istio) apiVersion: networking.istio.io/v1beta1 kind: EnvoyFilter metadata: name: jwt-auth-filter namespace: istio-system spec: workloadSelector: labels: istio: ingressgateway configPatches: - applyTo: HTTP_FILTER match: context: GATEWAY listener: filterChain: filter: name: envoy.filters.network.http_connection_manager subFilter: name: envoy.filters.http.jwt_authn patch: operation: INSERT_BEFORE value: name: envoy.filters.http.jwt_authn typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication providers: google: issuer: https://accounts.google.com audiences: - "my-app-client-id" remote_jwks: http_uri: uri: https://www.googleapis.com/oauth2/v3/certs cluster: outbound|443||www.googleapis.com timeout: 5s cache_duration: 300s rules: - match: prefix: /api requires: provider_name: google
# Wasm Plugin cho Custom Rate Limiting (Envoy Standalone) apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyExtensionPolicy metadata: name: wasm-rate-limit namespace: envoy-gateway-system spec: targetRefs: - group: gateway.networking.k8s.io kind: Gateway name: envoy-gateway extAuth: failOpen: false http: uri: "http://ratelimit-service:8080/rate-limit" includeRequestHeaders: - "x-forwarded-for" - "authorization" - "x-api-key" wasmModules: - name: custom-rate-limiter image: ghcr.io/myorg/wasm-rate-limiter:v1.2.0 pluginConfig: algorithm: "token-bucket" defaultLimit: 1000 window: "1m" keyExtractor: header: "x-api-key"
🔬 Envoy Wasm 2026: WebAssembly trong Envoy cho phép viết custom filters bằng Rust, Go, AssemblyScript, C++ — chạy sandboxed trong data plane với hiệu suất near-native. Use cases: custom auth, rate limiting, transformation, observability, A/B testing.

5. Cilium & eBPF Gateway 🔥

Cilium sử dụng eBPF (extended Berkeley Packet Filter) để chạy chương trình trực tiếp trong kernel Linux — bypass hoàn toàn iptables/kube-proxy. Năm 2026, Cilium 1.16+ implement Gateway API với hiệu suất vượt trội và L7 visibility sâu nhất.

eBPF Data Plane Architecture

📦
Pod
(App Container)
🔧
eBPF Programs
(TC/skb)
🧠
Kernel
(XDP/TC)
🚀
Cilium Agent
(Go + bpf)
# Cilium Gateway API Configuration (Helm values) gatewayAPI: enabled: true enableAlpn: true enableHttp: true enableGrpc: true cilium: k8sServiceHost: "" k8sServicePort: "" operator: replicas: 2 rollOutPods: true envoy: enabled: true securityContext: privileged: true resources: requests: cpu: 200m memory: 256Mi limits: cpu: 1000m memory: 1Gi hubble: enabled: true relay: enabled: true ui: enabled: true metrics: enabled: - dns:query;ignoreAAAA - drop - tcp - port-distribution - icmp - http
# Cilium Gateway + HTTPRoute với L7 Policy apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: cilium-gateway namespace: cilium-gateway annotations: io.cilium/gateway-class: "cilium" spec: gatewayClassName: cilium listeners: - name: http protocol: HTTP port: 80 allowedRoutes: namespaces: from: All - name: https protocol: HTTPS port: 443 tls: mode: Terminate certificateRefs: - kind: Secret name: wildcard-cert allowedRoutes: namespaces: from: All --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: api-route namespace: production annotations: io.cilium/l7-visibility: "enabled" spec: parentRefs: - name: cilium-gateway namespace: cilium-gateway hostnames: - "api.example.com" rules: - matches: - path: type: PathPrefix value: /api filters: - type: RequestHeaderModifier requestHeaderModifier: add: - name: x-cilium-gateway value: "ebpf-powered" - type: ExtensionRef extensionRef: group: cilium.io kind: CiliumEnvoyConfig name: api-rate-limit backendRefs: - name: api-service port: 80

L7 Visibility & Security với Hubble

Cilium cung cấp observability L7 độc đáo thông qua Hubble — không cần sidecar:

# CiliumNetworkPolicy cho L7 Security (kết hợp Gateway API) apiVersion: cilium.io/v2 kind: CiliumNetworkPolicy metadata: name: api-l7-policy namespace: production spec: endpointSelector: matchLabels: app: api-service ingress: - fromEndpoints: - matchLabels: io.cilium/gateway: "true" toPorts: - ports: - port: "80" protocol: TCP rules: http: - method: "GET" path: "/api/v1/health" - method: "GET" path: "/api/v1/.*" headers: - "Authorization": "Bearer .*" - method: "POST" path: "/api/v1/orders" headers: - "Content-Type": "application/json" - "X-Idempotency-Key": ".*" --- # Hubble CLI cho L7 Flow Observability # Xem real-time L7 flows hubble observe --protocol http --namespace production -f # Filter by HTTP method & path hubble observe --protocol http --http-method POST --http-path "/api/v1/orders" # Service dependency graph hubble observe --graph --namespace production | dot -Tpng > graph.png
⚡ Cilium eBPF Advantages 2026:
  • 10x throughput vs iptables/kube-proxy (bypass netfilter)
  • Zero sidecar L7 policy & visibility — tiết kiệm 30-50% resources
  • Kernel-level load balancing (XDP) — sub-microsecond latency
  • Network Policy L3/L4/L7 unified — CiliumNetworkPolicy
  • Encryption WireGuard / IPsec transparent encryption
  • Cluster Mesh Multi-cluster native với eBPF

6. So Sánh Chi Tiết 📊

Bảng So Sánh Tính Năng

Tính Năng Istio Envoy (GW) Cilium
Gateway API Support ✅ GA (v1.20+) ✅ GA (EG v1.0+) ✅ GA (v1.16+)
Data Plane Envoy Sidecar Envoy Standalone eBPF + Envoy
Architecture Sidecar per Pod Proxy per Gateway Kernel eBPF + DaemonSet
mTLS ✅ Auto (SPIFFE) ❌ Manual setup ✅ WireGuard/IPsec
L7 Policy ✅ AuthorizationPolicy ✅ ExtAuth + Wasm ✅ CiliumNetworkPolicy
L7 Visibility ✅ Envoy Stats + Telemetry API ✅ Access Logs + Wasm ✅ Hubble (no sidecar)
WASM Support ✅ Native (Proxy/WASM) ✅ Native ✅ Via Envoy
Performance (Latency) ~1-2ms (sidecar hop) ~0.5ms (single proxy) ~0.1ms (kernel eBPF)
Resource Overhead High (sidecar/pod) Medium (per gateway) Low (daemonset only)
Multi-cluster ✅ Mesh Federation ❌ Limited ✅ Cluster Mesh
Learning Curve Steep Medium Medium
Ecosystem Maturity 👑 Largest Growing (Envoy GW) Rapid Growth
CNCF Status Graduated Graduated (Envoy) Graduated
Best For Full Service Mesh, Zero-Trust, Multi-cluster High-perf Gateway, Custom Wasm, Simple Mesh High-perf, L7 Visibility, Kernel-native, Cost-sensitive

Khi Nào Chọn Giải Pháp Nào?

✅ Chọn Istio khi:
  • Cần full service mesh với mTLS tự động, traffic management phức tạp
  • Yêu cầu zero-trust security — AuthorizationPolicy, PeerAuthentication
  • Multi-cluster deployment với mesh federation
  • Team có kinh nghiệm Istio hoặc sẵn sàng invest learning curve
  • Cần ecosystem lớn nhất: Kiali, Grafana, Jaeger, Prometheus built-in
  • Compliance cần audit trail đầy đủ (SPIFFE/SPIRE integration)
✅ Chọn Envoy Gateway / Standalone khi:
  • Chỉ cần API Gateway / Ingress Controller hiệu suất cao
  • Muốn WASM custom logic (auth, rate-limit, transform) không cần sidecar
  • Architecture đơn giản: Gateway-only, không cần service mesh
  • Team mạnh về Envoy xDS, Go/Rust cho Wasm development
  • Integrate với Gloo, Contour, atau custom control plane
✅ Chọn Cilium khi:
  • Ưu tiên hiệu suất cực đại — eBPF kernel bypass, sub-ms latency
  • Cần L7 visibility & policy không sidecar (tiết kiệm 30-50% CPU/RAM)
  • Chạy large scale (>1000 nodes) — Cilium scale tốt nhất
  • Yêu cầu network encryption transparent (WireGuard/IPsec)
  • Multi-cluster với Cluster Mesh native
  • Cost optimization quan trọng — giảm resource overhead đáng kể

7. Case Studies Thực Tế 🏢

Case 1: Fintech Startup — Istio Zero-Trust Architecture

Công ty: Fintech Việt Nam, 50 engineers, xử lý 10K transactions/giây
Yêu cầu: PCI-DSS compliance, mTLS everywhere, audit trail, canary deployment an toàn
Giải pháp: Istio 1.22 + Gateway API trên EKS (3 AZ, 30 nodes)

# Istio Gateway API Production Setup apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: fintech-gateway namespace: istio-system annotations: service.beta.kubernetes.io/aws-load-balancer-type: "nlb" service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true" spec: gatewayClassName: istio-gateway listeners: - name: https protocol: HTTPS port: 443 tls: mode: Terminate certificateRefs: - kind: Secret name: fintech-wildcard-cert allowedRoutes: namespaces: from: All --- # AuthorizationPolicy cho PCI-DSS apiVersion: security.istio.io/v1beta1 kind: AuthorizationPolicy metadata: name: pci-api-policy namespace: production spec: selector: matchLabels: app: payment-api action: ALLOW rules: - from: - source: principals: - "cluster.local/ns/production/sa/api-gateway" - "cluster.local/ns/production/sa/internal-service" to: - operation: methods: ["POST"] paths: ["/api/v1/payments/*"] headers: x-pci-scope: ["true"]

Kết quả: Đạt PCI-DSS Level 1 certification, zero security incidents 12 tháng. Canary deployment an toàn với traffic split 5% → 25% → 100% trong 30 phút. Latency P99 < 50ms (sidecar overhead ~2ms). Team vận hành 2 SRE quản lý 30 microservices.

💰 Chi phí: ~$8,000/tháng (EKS + NLB + Istio overhead). Sidecar overhead ~15% CPU, nhưng đổi lấy security posture tối đa.

Case 2: E-commerce Platform — Cilium High-Performance Gateway

Công ty: Sàn TMĐT Đông Nam Á, 200+ engineers, peak 150K RPS (Black Friday)
Yêu cầu: Ultra-low latency, cost optimization, L7 observability, multi-region
Giải pháp: Cilium 1.16 + Gateway API trên GKE (3 regions, 100+ nodes/region)

# Cilium Gateway API cho High-Throughput E-commerce apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: ecom-gateway namespace: cilium-gateway annotations: networking.gke.io/load-balancer-type: "External" cloud.google.com/load-balancer-type: "External" spec: gatewayClassName: cilium listeners: - name: http protocol: HTTP port: 80 allowedRoutes: namespaces: from: All - name: https protocol: HTTPS port: 443 tls: mode: Terminate certificateRefs: - kind: Secret name: ecom-wildcard-cert allowedRoutes: namespaces: from: All --- # HTTPRoute với Cilium Extension cho Rate Limit apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: checkout-route namespace: production annotations: io.cilium/rate-limit: "enabled" spec: parentRefs: - name: ecom-gateway namespace: cilium-gateway hostnames: - "checkout.example.com" rules: - matches: - path: type: PathPrefix value: /checkout filters: - type: ExtensionRef extensionRef: group: cilium.io kind: CiliumEnvoyConfig name: checkout-rate-limit backendRefs: - name: checkout-service port: 80 --- # CiliumEnvoyConfig cho Custom Rate Limit apiVersion: cilium.io/v2alpha1 kind: CiliumEnvoyConfig metadata: name: checkout-rate-limit namespace: production spec: resources: - "@type": type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit stat_prefix: "checkout_rate_limit" token_bucket: max_tokens: 10000 tokens_per_fill: 1000 fill_interval: "1s" filter_enabled: runtime_key: "local_rate_limit_enabled" default_value: numerator: 100 denominator: HUNDRED filter_enforced: runtime_key: "local_rate_limit_enforced" default_value: numerator: 100 denominator: HUNDRED response_headers_to_add: - header: key: "x-rate-limit-remaining" value: "%RESPONSE_CODE%" append: false

Kết quả: Black Friday 2025: 180K RPS peak, P99 latency < 20ms (eBPF path). Cost infrastructure giảm 40% so với Istio (no sidecar). Hubble cung cấp L7 flow visibility real-time cho debugging incident. Cluster Mesh kết nối 3 regions seamless.

💰 Chi phí: ~$12,000/tháng (GKE + Cilium). Tiết kiệm ~$8,000/tháng so với Istio sidecar model. ROI: 150% trong 6 tháng.

9. Kết Luận 🎯

Kubernetes Gateway API 2026 đã trưởng thành và sẵn sàng cho production tại scale. Ba giải pháp hàng đầu — Istio, Envoy Gateway, Cilium — đều implement đầy đủ spec nhưng phục vụ bài toán khác nhau:

  • Istio: Full Service Mesh, Zero-Trust, Multi-cluster Federation — cho enterprise cần security posture tối đa 🛡️
  • Envoy Gateway: High-performance API Gateway, WASM extensibility — cho team muốn control plane nhẹ, custom logic mạnh
  • Cilium: eBPF Kernel-native, L7 Visibility no-sidecar, Cost-efficient — cho high-scale, cost-sensitive, performance-critical 🔥

Khuyến nghị: Bắt đầu với Gateway API standard resources (GatewayClass, Gateway, HTTPRoute) — vendor-agnostic. Sau đó chọn implementation phù hợp với requirement cụ thể. Migration giữa các implementation dễ dàng vì cùng dùng Gateway API spec.

Năm 2026 đánh dấu sự hội tụ của Service Mesh + API Gateway + eBPF dưới một API chuẩn. Đầu tư học Gateway API hôm nay = bảo vệ investment cho 5-10 năm tới. Hãy bắt đầu migrate từ Ingress ngay hôm nay! 🚀