Skip to content

检测 Knative 版本

要检查Knative安装的版本,可以使用以下命令之一,具体取决于您是用YAML还是用Operator安装Knative。

如果你使用 YAML 安装

要验证在集群上运行的Knative组件的版本,请查询<component>.knative.dev/release 标签。

运行命令查看已安装的Knative服务版本:

kubectl get namespace knative-serving -o 'go-template={{index .metadata.labels "serving.knative.dev/release"}}'

示例输出:

v0.23.0

运行以下命令检查安装的Knative event版本:

kubectl get namespace knative-eventing -o 'go-template={{index .metadata.labels "eventing.knative.dev/release"}}'

示例输出:

v0.23.0

如果你使用 Operator 安装

要验证您当前安装的Knative版本:

运行命令查看已安装的Knative服务版本:

kubectl get KnativeServing knative-serving --namespace knative-serving

示例输出:

NAME              VERSION         READY   REASON
knative-serving   0.23.0          True

运行以下命令检查安装的Knative event版本:

kubectl get KnativeEventing knative-eventing --namespace knative-eventing

示例输出:

NAME               VERSION         READY   REASON
knative-eventing   0.23.0          True
Back to top

We use analytics and cookies to understand site traffic. Information about your use of our site is shared with Google for that purpose. Learn more.

× OK