GKE 上的 Knative 无法处理某些图像,显示 RevisionMissing 错误

Knative on GKE is not working with some images, shows RevisionMissing error

我是 运行 GKE 集群上的 Knative。 Knative 网站上提供的示例图像可以工作,但是当我切换到其他一些图像时,它会停止工作。 3 个容器中只有 2 个容器工作,路由的就绪状态保持 'unknown',原因显示为 'RevisionMissing'。

我尝试了多张图片,k8s.gcr。io/hpa-example 是其中一张。

编辑: 集群有一个 n1-standard-4 类型的双节点配置(4 个 vCPU,15 GB 内存)。我使用带有最新版本 kubernetes 的 GCP 控制台创建了这个集群,并选中了启用 Istio 复选框。我使用以下命令安装 Knative:

kubectl apply --selector knative.dev/crd-install=true \
-f https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml \
-f https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml \
-f https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml

kubectl apply \
-f https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml \
-f https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml \
-f https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml

谢谢

感谢您的精确。

当您安装 Knative 时,您应该会看到这种错误

# Without CRD 
unable to recognize "https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml": no matches for kind "Gateway" in version "networking.istio.io/v1alpha3"
unable to recognize "https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml": no matches for kind "Gateway" in version "networking.istio.io/v1alpha3"
unable to recognize "https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml": no matches for kind "Image" in version "caching.internal.knative.dev/v1alpha1"
unable to recognize "https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml": no matches for kind "ClusterChannelProvisioner" in version "eventing.knative.dev/v1alpha1"


# Without CRD 
Error from server (NotFound): error when creating "https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml": namespaces "istio-system" not found
Error from server (NotFound): error when creating "https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml": namespaces "istio-system" not found
Error from server (NotFound): error when creating "https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml": namespaces "istio-system" not found
Error from server (NotFound): error when creating "https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml": namespaces "istio-system" not found

您没有installed Istio。这样做,重新启动 knative 安装(有和没有 CRD)以解决以前的错误并享受!!!

好的,我找到问题了。我尝试发布自定义图像。一切正常,直到我将端口(内部图像)更改为 80。此图像不仅可以作为 Knative 服务使用,而且,它也不适用于 Cloud 运行 服务。 底线是,要么从环境变量中提取端口号,要么将其硬编码到 80 以外的任何其他端口。