kubernetes “ImagePullBackOff”的istio bookinfo示例应用程序部署失败

yvt65v4c  于 2022-11-21  发布在  Kubernetes
关注(0)|答案(2)|浏览(270)

我正在尝试使用以下命令部署istio的示例bookinfo应用程序

kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml

从这里
但每次我都得到ImagePullBackoff错误,如下所示:

NAME                              READY   STATUS             RESTARTS   AGE
details-v1-c74755ddf-m878f        2/2     Running            0          6m32s
productpage-v1-778ddd95c6-pdqsk   2/2     Running            0          6m32s
ratings-v1-5564969465-956bq       2/2     Running            0          6m32s
reviews-v1-56f6655686-j7lb6       1/2     ImagePullBackOff   0          6m32s
reviews-v2-6b977f8ff5-55tgm       1/2     ImagePullBackOff   0          6m32s
reviews-v3-776b979464-9v7x5       1/2     ImagePullBackOff   0          6m32s

有关错误详细信息,我已运行:

kubectl describe pod reviews-v1-56f6655686-j7lb6

它会传回下列项目:

Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  7m41s                  default-scheduler  Successfully assigned default/reviews-v1-56f6655686-j7lb6 to minikube
  Normal   Pulled     7m39s                  kubelet            Container image "docker.io/istio/proxyv2:1.15.3" already present on machine
  Normal   Created    7m39s                  kubelet            Created container istio-init
  Normal   Started    7m39s                  kubelet            Started container istio-init
  Warning  Failed     5m39s                  kubelet            Failed to pull image "docker.io/istio/examples-bookinfo-reviews-v1:1.17.0": rpc error: code = Unknown desc = context deadline exceeded
  Warning  Failed     5m39s                  kubelet            Error: ErrImagePull
  Normal   Pulled     5m39s                  kubelet            Container image "docker.io/istio/proxyv2:1.15.3" already present on machine
  Normal   Created    5m39s                  kubelet            Created container istio-proxy
  Normal   Started    5m39s                  kubelet            Started container istio-proxy
  Normal   BackOff    5m36s (x3 over 5m38s)  kubelet            Back-off pulling image "docker.io/istio/examples-bookinfo-reviews-v1:1.17.0"
  Warning  Failed     5m36s (x3 over 5m38s)  kubelet            Error: ImagePullBackOff
  Normal   Pulling    5m25s (x2 over 7m38s)  kubelet            Pulling image "docker.io/istio/examples-bookinfo-reviews-v1:1.17.0"

我需要先构建dockerfile并将其推送到本地存储库吗?那里没有明确的说明,或者我找不到任何说明。
有人能帮忙吗?

fdbelqdn

fdbelqdn1#

如果您在dockerhub中签入该图像,则会显示该图像:
https://hub.docker.com/r/istio/examples-bookinfo-reviews-v1/tags
所以你需要处理的错误是context deadline exceeded,这可能是一个网络错误(一个普通的Go错误,说它花了太长的时间),这取决于你的集群运行在哪里,你可以从节点上手动执行一个docker pull,这应该可以工作。
编辑:对于minikube,执行minikube ssh,然后执行docker pull

iugsix8n

iugsix8n2#

已通过以下命令解决问题:

minikube ssh docker pull istio/examples-bookinfo-reviews-v1:1.17.0

从这个git发出here
也称为How to use local docker images with Minikube?
希望这能帮助到一些人

相关问题