当前位置:网站首页>SMI 与 Gateway API 的 GAMMA 倡议意味着什么?
SMI 与 Gateway API 的 GAMMA 倡议意味着什么?
2022-07-30 15:33:00 【InfoQ】
Gateway
GatewayClass
HTTPRoute
- 规范的参与:这个倡议由 SIG Network(Gateway API所在的 Kubernetes SIG)与服务网格社区共同发起,服务网格社区有来自 Cilium Service Mesh、Consul、Istio、Kuma、Linkerd、SMI、NGINX Service Mesh 和 Open Service Mesh 的代表。SMI 与其他几个不同,它是服务网格的规范 API,并非是实现,Gateway API 也一样。
- 面向东西向流量:小组的首个工作探索使用 Gateway API 处理东西向流量已经开始。东西向流量,也就是服务网格中服务到服务的流量。
规范
服务网格的规范 SMI

Kubernetes Gateway API

HTTPRoute
TCPRoute
UDPRoute
TLSRoute
- 厂商实现了Gateway API 并定义了自己
GatewayClass
类型,一系列的实现可供选择。
- 集群管理员安装 Gateway API 的实现,部署跨命名空间的共享网关实例,或者命名空间独享的网关实例。如下图,集群管理员部署了跨
store
和site
命名空间的网关foo
。
- 开发人员创建
HTTPRoute
资源将流量路由到指定的后端服务。

现有的流量规范
SMI TrafficSplit
TrafficSplit
service
ClusterIP
HTTPRouteGroup
service
website
website-v2
spec.service
service
kind: TrafficSplit
metadata:
name: ab-test
spec:
service: website
matches:
- kind: HTTPRouteGroup
name: ab-test
backends:
- service: website-v1
weight: 0
- service: website-v2
weight: 100
---
kind: HTTPRouteGroup
metadata:
name: ab-test
matches:
- name: firefox-users
headers:
user-agent: ".*Firefox.*"
Istio VirtualService
VirtualService
hosts
VirtualService
spec:
hosts:
- reviews.prod.svc.cluster.local # could also be just "reviews"
http:
- match:
- uri:
prefix: "/frontpage"
route:
- destination:
host: frontpage.prod.svc.cluster.local
Kuma TrafficRoute
service
ClusterIP
spec:
sources:
- match:
kuma.io/service: backend_default_svc_80
destinations:
- match:
kuma.io/service: redis_default_svc_6379
conf:
http:
- match: …
Cilium CiliumEnvoyConfig
service
ClusterIP
spec:
services:
- name: httpbin
namespace: default
listener: envoy-lb-listener
backendServices:
- name: echo
namespace: default
resources: …
Consul ServiceRouter
ServiceRouter
web
service
ClusterIP
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceRouter
metadata:
name: web
spec:
routes:
- match:
http:
pathPrefix: /admin
destination:
service: admin
Linkerd ServiceProfile
ServiceProfile
Host
routes
/admin
/store
apiVersion: linkerd.io/v1alpha2
kind: ServiceProfile
metadata:
name: webapp.my-service-namespace.svc.cluster.local
spec:
routes: …
未来的设计
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: my-route
namespace: gateway-api-example-ns2
spec:
parentRefs:
- kind: Gateway
name: foo-gateway
namespace: gateway-api-example-ns1
hostnames:
- foo.example.com
rules:
- backendRefs:
- name: foo-svc
port: 8080
HTTPRoute
- 与<u>网关实现</u>(
foo-gateway.gateway-api-example-ns1
)的映射(通过parentRefs
实现),也就是说将流量匹配规则写入到哪个网关实例。
- 与<u>服务</u>(
foo-svc:8080
)的映射(通过hostnames
实现)。
HTTPRoute
spec.hostnames
spec.rules
method
path
东西向流量
- 与<u>网格实现</u>的映射,将流量匹配规则写入到某种网格的 sidecar 中。
- 与<u>服务</u>的映射,如何将进入到网格 sidecar 流量与目标服务(网格内的服务,或者网格外的服务)进行匹配。
总结

边栏推荐
猜你喜欢
flask获取post请求参数
[flutter] What is MaterialApp and Material design
nodejs环境变量设置
【HMS core】【Media】【Video Editing Service】 The online material cannot be displayed, it is always in the loading state or the network is abnormal
Flask introductory learning tutorial
php如何截取字符串的前几位
php how to query string occurrence position
How to intercept the first few digits of a string in php
【开发者必看】【push kit】推送服务典型问题合集2
Redis 复习计划 - Redis 数据结构和持久化机制
随机推荐
Why is there no data reported when the application is connected to Huawei Analytics in the application debugging mode?
TiUP FAQ
R中按照数字大小进行排序
Mysql database query is very slow. Besides the index, what else can be caused?
SEATA distributed transaction
How to implement timing tasks for distributed applications in Golang
TiDB tool download
数据库 - 创建数据库、表、函数等
Flask入门学习教程
华为「天才少年」计划招募的博士们,迎来首秀!
RISC-V calling conventions
vite 多页面应用刷新页面时,不会在当前路由中,会返回到根路由
武汉星起航:海外仓基础建设成为跨境电商企业的一大出海利器
Core Topics under Microservice Architecture (2): Design Principles and Core Topics of Microservice Architecture
【HMS core】【Media】【Video Editing Service】 The online material cannot be displayed, it is always in the loading state or the network is abnormal
三维重建方法汇总
Recent learning defragmentation (24)
RobotStudio实现喷漆、打磨等功能(曲面路径生成与仿真)
应用OPC解决方案实现控制系统数据的安全交换
Xshell命令