首页 > 解决方案 > GCloud Build - 错误:Dial tcp -- 没有这样的主机

问题描述

嗨,我有以下 skaffold.yaml 文件

apiVersion: skaffold/v2beta5
kind: Config
build:
  artifacts:
    - image: us.gc.io/directed-relic-285313/auth
      context: auth
      sync:
        manual:
          - src: 'src/**/*.ts'
            dest: .
      docker:
        dockerfile: Dockerfile
  googleCloudBuild:
    projectId: directed-relic-285313
deploy:
  kubectl:
    manifests:
      - ./infra/k8s/*

我设置了所有能够利用谷歌云进行开发的东西。即,我下载了google cloud SDK,安装了google cloud context,配置了kubectl来使用它等等。

现在,当我运行时, skaffold dev 我看到以下错误

Successfully built 4a849a25796b
Successfully tagged us.gc.io/directed-relic-285313/auth:latest
PUSH
Pushing us.gc.io/directed-relic-285313/auth:latest
The push refers to repository [us.gc.io/directed-relic-285313/auth]
Get https://us.gc.io/v2/: dial tcp: lookup us.gc.io on 169.254.169.254:53: no such host
ERROR: push attempt 1 detected failure, retrying: step exited with non-zero status: 1
Pushing us.gc.io/directed-relic-285313/auth:latest
The push refers to repository [us.gc.io/directed-relic-285313/auth]
Get https://us.gc.io/v2/: dial tcp: lookup us.gc.io on 169.254.169.254:53: no such host
ERROR: push attempt 2 detected failure, retrying: step exited with non-zero status: 1
Pushing us.gc.io/directed-relic-285313/auth:latest

知道从哪里开始调试吗?或者什么可能导致错误?

标签: dockerkubernetesgoogle-kubernetes-enginegcloudgoogle-cloud-build

解决方案


有一个错字...... us.gcr.io......不是us.gc.io

谢谢 tarun_khosla


推荐阅读