Skip to content

Gateway API

References

About

Gateway APIはClusterの外にいるClientからClusterの中にあるServiceへのtraffic routingを管理する目的で策定されました。

Gatewayリソース(基礎となるネットワークゲートウェイ/プロキシサーバ) を中心としたリソースのコレクションであり、シンプルな機能提供にとどまるIngressに対してプロトコルやtraffic routingなど運用面で不足している機能などが追加されたNetwork機能を提供するものです。

2023/10/31にv1.0: GA Release されたKubernetes Projectです。

Gateway API is an official Kubernetes project focused on L4 and L7 routing in Kubernetes. This project represents the next generation of Kubernetes Ingress, Load Balancing, and Service Mesh APIs. From the outset, it has been designed to be generic, expressive, and role-oriented. -- Introduction から引用

Ingressにはいくつかの課題があります。
refs https://blog.nginx.org/blog/5-reasons-to-try-the-kubernetes-gateway-api

  1. インフラ管理者/Cluster管理者/アプリケーション開発者 間の責任分界点が明確ではなかった
  2. L7しかサポートしていない
  3. 細かなtraffic routingはingress controller(Nginx IngressControllerやAWS load-balancer-controllerなど) ごとに提供されるannotationで管理するため環境依存が発生する

Gateway APIはこれらの問題を解決することも考慮し策定されました。

  1. 以下のようなリソースモデルにより役割が分かれている
  2. L4とL7をサポート
  3. HTTPS/HTTP だけでなくTLSやTCP/UDPなど様々なtraffic routingをサポート

Architecture

Resources

BackendTLSPolicy

v1.1.0では v1alpha3 の機能です。

Gateway から backend serviceにHTTPSでtraffic routingする場合のTLS設定です。Cluster外のclientからのTLS暗号をbackend serviceで終端させる passthrough と Cluster外のclientからのTLS暗号をGatewayで終端させてGatewayとbackend serviceで新たなTLS暗号を行う edge があります。

ReferenceGrant

Progressive delivery

xRouteリソースの BackendRef には weight properties があり、Progressive deliveryをサポートします。

Argo RolloutsもGateway APIでのProgressive deliveryをサポートしています。

Service Mesh

Gateway APIはClusterの外にいるClientからClusterの中にあるServiceへのtraffic routingを管理する目的で策定されました。しかし時が経つにつれてService Meshに対する関心が高まってきており、Gateway APIを同一Cluster内のeast/west traffic routingに利用する方法を策定する目的で GAMMA(Gateway API for Mesh Management and Administration) Initiative が立ち上がりました。

2024/05/9に v1.1.0Gateway API for Service Mesh がGA Releaseされました。それに伴いIstio v1.22で Gateway API Mesh Support Promoted To Stable となりました。

Implementations

https://gateway-api.sigs.k8s.io/implementations/

Gateway APIを実装した製品群

Argo Rollouts

Cloud Provider

AWS

Google Cloud