首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >来自Google容器注册中心的ImagePullBackOff Kubernetes

来自Google容器注册中心的ImagePullBackOff Kubernetes
EN

Server Fault用户
提问于 2019-04-18 10:04:14
回答 1查看 2.1K关注 0票数 1

https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app上可用的标准Hello应用程序不起作用。尽管在GCP上使用Kubernetes与Google结合使用时,事情应该立即开始工作,但似乎存在一些拉入问题。

例如,参考:https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod

其中提到:

“使用Google Container在运行Google Compute Engine ( GCE )时,对Google容器注册表(GCR)有本机支持。如果您在GCE或Google Kubernetes引擎上运行集群,只需使用完整的映像名(例如gcr.io/my_project/ image :tag)。集群中的所有豆荚都可以读取此注册表中的图像访问权限。

我再次检查是否使用了正确的图像名称(复制,从容器注册表粘贴它)。

错误消息:

代码语言:javascript
复制
C:\Users\rober>kubectl get pods
NAME                         READY     STATUS             RESTARTS   AGE
hello-web-694bc87958-rcdvg   0/1       ImagePullBackOff   0          7s

  Type     Reason          Age               From                                                   Message
  ----     ------          ----              ----                                                   -------
  Normal   Scheduled       7m                default-scheduler                                      Successfully assigned default/hello-web-694bc87958-rcdvg to gke-hello-cluster-default-pool-9cbfb505-588j
  Normal   SandboxChanged  7m (x3 over 7m)   kubelet, gke-hello-cluster-default-pool-9cbfb505-588j  Pod sandbox changed, it will be killed and re-created.
  Normal   BackOff         7m (x6 over 7m)   kubelet, gke-hello-cluster-default-pool-9cbfb505-588j  Back-off pulling image "gcr.io/data-platform-tst/hello-app:v1"
  Normal   Pulling         6m (x3 over 7m)   kubelet, gke-hello-cluster-default-pool-9cbfb505-588j  pulling image "gcr.io/data-platform-tst/hello-app:v1"
  Warning  Failed          6m (x3 over 7m)   kubelet, gke-hello-cluster-default-pool-9cbfb505-588j  Failed to pull image "gcr.io/data-platform-tst/hello-app:v1": rpc error: code = Unknown desc = Error response from daemon: repository gcr.io/data-platform-tst/hello-app not found: does not exist or no pull access
  Warning  Failed          6m (x3 over 7m)   kubelet, gke-hello-cluster-default-pool-9cbfb505-588j  Error: ErrImagePull
  Warning  Failed          2m (x24 over 7m)  kubelet, gke-hello-cluster-default-pool-9cbfb505-588j  Error: ImagePullBackOff
EN

回答 1

Server Fault用户

发布于 2021-03-25 22:32:26

请确保在群集中为服务帐户设置了适当的作用域以提取映像。请按照正式文件提供关于如何授予用户从容器注册表中提取图像的权限的逐步说明。

我知道您正在使用,因此在本例中,GKE节点已经可以访问与集群相同的Google平台项目中的映像。

因此,请检查您给集群的范围。

按照接下来的步骤或正式文件

  • 创建一个集群
  • 从源代码构建图像
  • 将其推送到
  • 部署到GKE。
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/963638

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档