问题描述
我正在尝试在我的本地机器 (macos) 上通过 google cloud kubernetes 使用 docker。我在项目中设置了 skaffold.yaml 文件,如下所示,并希望将图像推送到 australia-southeast1 中的存储服务,而不是 us.gcr.io
如何将图片指定给 australia-southeast1?
apiVersion: skaffold/v2alpha3
kind: Config
deploy:
kubectl:
manifests:
- ./infra/k8s/*
build:
local:
push: false
googleCloudBuild:
projectId: ticketing
artifacts:
- image: us.gcr.io/
context: auth
docker:
dockerfile: Dockerfile
sync:
manual:
- src: 'src/**/*.ts'
dest: .
解决方法
如果您想使用区域支持,在这种情况下 australia-southeast1
,您必须选择使用 Artifact Registry,因为它仅根据 this document 支持区域支持,但看起来像Skaffold 的默认设置是容器注册表,因此根据 this document,您可能应该选择 asia.gcr.io
,因为离澳大利亚最近的多区域是亚洲。