Knative路由配置与流量管理详解
1. 路由基础操作与创建
使用 kn route describe 命令可以查看路由的详细信息,例如:
$ kn route describe hello-example
Name:
hello-example
Namespace:
default
Age:
2d
URL:
http://hello-example.default.example.com
Service:
hello-example
Traffic Targets:
100%
@latest (hello-example-zcttz-8)
Conditions:
OK TYPE
AGE REASON
++ Ready
3h
++ AllTrafficAssigned
4h
++ IngressReady
3h
创建路由最简单的方法是通过服务来创建。当使用 kn service create 时,会创建一个服务,该服务会进一步创建一个路由。同样,使用 kn service update 会更新路由以指向新的版本,使用 kn service delete 则会删除路由。
2. 路由剖析
路由的核心工作在于 spec.traffic ,它是路由规范中唯一的关键部分。 traffic 是一个流量目标数组,这些流量目标是路由的关键。以下是一
Knative路由与流量管理详解
超级会员免费看
订阅专栏 解锁全文
1820

被折叠的 条评论
为什么被折叠?



