0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Meshed Gatewayざっくり解説

Last updated at Posted at 2025-07-02

Meshed Gatewayとは

Meshed GatewayはService Meshに統合されたゲートウェイです。従来のIngress Controllerと異なり、外部トラフィックを受信した瞬間からService Meshの管理下で処理します。

従来のIngress Controllerとの比較

従来のNginx Ingress

[外部クライアント] --HTTPS--> [Nginx Pod] --HTTP--> [アプリPod + Sidecar]
                         ↑                          ↑
                   独立コンポーネント            部分的なMesh連携

Meshed Gateway

[外部クライアント] --HTTPS--> [Gateway Pod] ==mTLS==> [アプリPod]
                        nginx + istio-proxy    app + istio-proxy
                             ↑                      ↑
                      Meshの完全な一員            完全なMesh管理

主な違い

  • GatewayがService Meshの一部として動作
  • 外部トラフィックが即座にMesh管理下に移行
  • 統一されたセキュリティポリシーと監視

内部トラフィックフロー

Gateway Pod内部では以下の処理が行われます:

┌─────────────────────────────────┐
│       Gateway Pod               │
│ ┌─────────────────────────────┐ │
│ │ nginx (port 443)            │ │ ← HTTPS受信
│ └──────────┬──────────────────┘ │
│            ↓ localhost転送       │
│ ┌─────────────────────────────┐ │
│ │ istio-proxy (port 15001)    │ │ ← iptablesによるキャプチャ
│ │ → mTLS暗号化                 │ │    暗号化してバックエンドへ送信
│ └─────────────────────────────┘ │
│ └─────────────────────────────┘ │
└─────────────────────────────────┘

処理フロー

  1. 外部クライアントからHTTPSリクエスト受信
  2. nginxが443ポートで処理
  3. nginxがバックエンドサービスへ転送
  4. iptablesがトラフィックをキャプチャ
  5. istio-proxyがmTLS暗号化して送信

統一トラフィック管理

Meshed Gatewayでは単一のVirtualServiceでトラフィック制御が可能です:

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
spec:
  gateways:
  - my-gateway
  http:
  - match:
    - headers:
        canary: "true"
    route:
    - destination:
        host: backend
        subset: v2
      weight: 100  # カナリアユーザーを新バージョンにルーティング

Gateway API統合

Gateway APIのinfrastructureフィールドでMesh統合を設定:

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: meshed-gateway
spec:
  gatewayClassName: nginx
  infrastructure:
    labels:
      istio-injection: enabled      # Istio Sidecar注入
    annotations:
      linkerd.io/inject: enabled    # Linkerd Sidecar注入
  listeners:
  - name: https
    protocol: HTTPS
    port: 443

主要なメリット

統合管理

  • Service Meshの一員として動作
  • 外部トラフィックの即座なMesh統合
  • 統一されたセキュリティ、監視、トラフィック制御

運用効率

  • 単一設定での包括的制御
  • Gateway APIによる標準化
  • 複数Mesh環境での一貫した運用
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?