我在Google Cloud run上创建了一项服务,可以使用Container注册表中的图像通过Google Cloud Console手动进行部署。但是从CLI部署失败。这是我正在使用的命令以及出现的错误。我无法理解我所缺少的内容:
$ gcloud beta run deploy service-name --platform managed --region region-name --image image-url
Deploying container to Cloud Run service [service-name] in project [project-name] region [region-name]
X Deploying...
. Creating Revision...
. Routing traffic...
Deployment failed
ERROR: (gcloud.beta.run.deploy) INVALID_ARGUMENT: The request has errors
- '@type': type.googleapis.com/google.rpc.BadRequest
fieldViolations:
- description: spec.revisionTemplate.spec.container.ports should be empty
field: spec.revisionTemplate.spec.container.ports
Run Code Online (Sandbox Code Playgroud)
更新1:
我已使用来更新SDK gcloud components update,但仍然存在相同的问题
这是我的SDK版本
$gcloud version
Google Cloud SDK 270.0.0
beta 2019.05.17
bq 2.0.49
core 2019.11.04
gsutil 4.46
Run Code Online (Sandbox Code Playgroud)
我正在使用多阶段docker构建。这是我的Dockerfile: …
如上所述这里,Knative的激活接收和缓冲的要求不活跃修订。
这个路由是如何实现的?我在应用程序的命名空间中看到的只是一个 VirtualService 路由对修订版的请求,所以我看不到进入网格的流量是如何重定向到 Activator 的。
Knative 服务版本:0.9.0