我在GKE集群上运行Knative。Knative 网站上提供的示例图像可以工作,但是当我切换到其他一些图像时,它停止工作。3 个容器中只有 2 个容器工作,路由的就绪状态保持"未知",原因显示为"修订缺失"。
我尝试了多张图像,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
谢谢
好的,我发现了问题。我尝试发布自定义图像。一切都有效,直到我将端口(内部图像(更改为 80。此映像不仅可以用作Knative服务,而且在云运行服务上也不起作用。 底线是,要么从环境变量中提取端口号,要么将其硬编码到 80 以外的任何其他端口。
感谢您的精度。
当你安装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
您没有安装 Istio。这样做,重新启动knative安装(有和没有CRD(来解决以前的错误并享受!!