0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

containerdでRed HatのUBIを使おうとしたらイメージのpullに失敗する

Posted at

環境

  • さくらのクラウド上に立てたサーバ(下記いずれのサーバでも発生)
    • k3OS(v0.2.0)
    • k3OS(v0.3.0)
    • Ubuntu 18.04.2 + containerd

状況

RedHatのUBIを使おうとするとイメージのpullに失敗する
(UBIについてはこちらの記事などを参照)

再現手順(k3OSの場合)

# UBI(minimal)を指定
$ kubectl create deployment --image registry.access.redhat.com/ubi8-minimal ubi-test

エラー内容

スクリーンショット 2019-10-03 16.15.45.png
$ kubectl describe pod <pod名>

...
Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  6m21s                  default-scheduler  Successfully assigned default/ubi-test-7d4f447fdd-7qr7w to example
  Normal   Pulling    4m46s (x4 over 6m20s)  kubelet, example   Pulling image "registry.access.redhat.com/ubi8-minimal"
  Warning  Failed     4m46s (x4 over 6m20s)  kubelet, example   Failed to pull image "registry.access.redhat.com/ubi8-minimal": rpc error: code = Unknown desc = failed to resolve image "registry.access.redhat.com/ubi8-minimal:latest": no available registry endpoint: could not resolve digest for registry.access.redhat.com/ubi8-minimal:latest
  Warning  Failed     4m46s (x4 over 6m20s)  kubelet, example   Error: ErrImagePull
  Normal   BackOff    4m30s (x6 over 6m20s)  kubelet, example   Back-off pulling image "registry.access.redhat.com/ubi8-minimal"
  Warning  Failed     68s (x21 over 6m20s)   kubelet, example   Error: ImagePullBackOff

再現手順(Ubuntuの場合)

containerdはこちらの手順に従いセットアップ
https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd

$ sudo crictl pull registry.access.redhat.com/ubi8-minimal

FATA[0000] pulling image failed: rpc error: code = Unknown desc = failed to resolve image "registry.access.redhat.com/ubi8-minimal:latest": no available registry endpoint: could not resolve digest for registry.access.redhat.com/ubi8-minimal:latest 

調べた結果

どうもこのcontainerdのIssueっぽい。

containerd/containerd: Resolver requires optional Docker-Content-Digest #3238

修正状況

こちらのPRで対応済み。
https://github.com/containerd/containerd/pull/3245

また、containerd v1.2系へのバックポートもされている。
https://github.com/containerd/containerd/pull/3591

解決方法

containerd v1.2.9/v1.3.0以降のバージョンを使えばOK

k3OS/k3sの場合

最新版のk3s(v0.9.1)のcontainerdはv1.2.8ベースなのでNG。
すでにmasterブランチではv1.3系に切り替わっているっぽいので次のバージョンを待つ or 自前でmasterブランチをビルドするのが良さそう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?