【问题标题】:Knative on GKE is not working with some images, shows RevisionMissing errorGKE 上的 Knative 无法处理某些图像,显示 RevisionMissing 错误
【发布时间】:2019-09-03 12:30:03
【问题描述】:

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

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

编辑: 集群有一个配置类型为 n1-standard-4 的两个节点(4 个 vCPU,15 GB 内存)。我使用 GCP 控制台和最新版本的 kubernetes 创建了这个集群,并选中了 Enable 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的?你有多少个节点?节点的大小(cpu 和内存)?
  • 感谢@guillaume blaquiere,我已在问题中添加了所需信息。

标签: google-cloud-platform google-kubernetes-engine knative knative-serving


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    感谢您的精确。

    当您安装 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)以解决以前的错误并享受!!!

    【讨论】:

    • 亲爱的 gillaume,我忘了明确提到(现在已编辑)集群是使用 Istio 创建的(GCP 提供了一个复选框来启用它)。此外,安装 knative 时没有错误。请再次阅读问题。我能够使用在 knative 网站上共享的图像(在示例中)创建 knative 服务(在内部创建配置、路由和修订)。但如果我使用任何不同的图像,它就不起作用。未创建虚拟服务,并且路由显示“RevisionMissing”错误。
    • 当我在没有 istio 的情况下使用 knative 时,我的行为完全相同。
    • Istio 是必备的先决条件。没有 istio 就没有必要测试它。
    • 除非你不知道前提条件,像我一样,我第一次测试knative。我刚刚分享了我的个人失败!
    猜你喜欢
    • 1970-01-01
    • 2014-08-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多