【问题标题】:GCloud Build - Error: Dial tcp -- no such hostGCloud Build - 错误:Dial tcp -- 没有这样的主机
【发布时间】:2020-08-03 19:07:28
【问题描述】:

您好,我有以下 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/*

我设置了所有能够利用谷歌云进行开发的东西。即,我下载了谷歌云 SDK,安装了谷歌云上下文,配置了 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

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

【问题讨论】:

  • 不应该 repo 是 us.gcr.io 而不是 us.gc.io 吗?
  • yepppp 我打错字了...呃,谢谢!

标签: docker kubernetes google-kubernetes-engine gcloud google-cloud-build


【解决方案1】:

有错别字.... us.gcr.io...不是us.gc.io

谢谢 tarun_khosla

【讨论】:

    猜你喜欢
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多