1

尝试按照在 Intellij 中使用 Cloud Code 部署 Cloud Run 服务的入门说明(使用 部署 HelloWorld Flask 应用程序容器Cloud Run: Deploy)但出现以下错误,知道为什么会发生这种情况

它最初工作,即使用相同的步骤将应用程序部署在 Cloud Run 服务上,然后在尝试重新部署一周左右后开始抛出此错误,项目设置没有变化。

intellij 和 docker 版本是最新的。

通过谷歌云项目认证gcloud auth login --update-adc

本地运行正常(Cloud Run: Run Locally),

但运行Cloud Run: Deploy 抛出此“代码 89”错误

Preparing Google Cloud SDK (this may take several minutes for first time setup)...

Creating skaffold file: /var/.../skaffold8013155926954225609.tmp

Configuring image push settings in /var/.../skaffold8013155926954225609.tmp


../Library/Application Support/cloud-code/bin/versions/../
  skaffold build --filename /var/.../skaffold8013155926954225609.tmp --tag latest --skip-tests=true

invalid skaffold config: getting minikube env: 
running [/Users/USER/Library/Application Support/google-cloud-tools-java/managed-cloud-sdk/LATEST/google-cloud-sdk/bin/
  minikube docker-env --shell none -p minikube --user=skaffold]

 - stdout: "false exit code 89"
 - stderr: ""
 - cause: exit status 89

 Failed to build and push Cloud Run container image. 
 Please ensure your builder settings are correct, network is available, you are logged in to a valid GCP project, and try again.

编辑:我看到 minikube 错误代码 89:ExGuestUnavailable并且它是特定于访客主机的错误代码,仍然不清楚可能导致此问题的原因

4

2 回答 2

1

看起来像是 skaffold 尝试与 minikube 通信的问题(也可用于构建图像)。请尝试清洁 minikube

minikube stop
minikube delete --all --purge

然后再试一次。

于 2021-11-03T20:55:57.230 回答
0

ok, i still don't know why it fails to deploy to cloud run from intellij but i got it to deploy from command line

cd my-flask-app

#step 1: build container image from Dockerfile and submit to container registry
gcloud builds submit --tag gcr.io/GCP_PROJECT_ID/my-flask-app

#step 2: deploy the image on cloud run (reference) 
gcloud run deploy --image  gcr.io/GCP_PROJECT_ID/my-flask-app

references:

于 2021-10-19T11:01:39.710 回答