oc debug
コマンドが container is unable to start error
で失敗するのはなぜですか?
プライベート・クラスターで oc debug
コマンドを実行すると、以下のようなエラー・メッセージが表示されます。
oc debug node/<node-name>
Starting pod/1024104-debug ...
To use host binaries, run `chroot /host`
warning: Container container-00 is unable to start due to an error: Back-off pulling image "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7dd7a3a1be7009629c709e6c88a1551d471aba9bf3deb873bc5f4d814675edfe"
oc debug
コマンドは、指定したノードでデバッグ・ポッドを開始します。 デバッグ・ポッドは、quay.io
コンテナー・レジストリーのパブリック・コンテナー・イメージを使用します。 パブリック・インターネットにアクセスできないプライベート・クラスターでは、クラスターはパブリック・レジストリーからデバッグ・コンテナー・イメージをプルできません。
この問題を解決するには、ocp-release
から quay.io
イメージをプルし、それをプライベート・イメージ・レジストリーにプッシュします。 次に、oc debug
コマンドを実行するときに、使用するプライベート・コンテナー・イメージを指定します。
-
quay.ioからクラスタのバージョンとアーキテクチャに合ったイメージを取り出します。 例えば、
4.7.19
クラスターの場合は、quay.io/openshift-release-dev/ocp-release:4.7.19-x86_64
イメージをプルします。 イメージをプルするには、Red Hat アカウントと権限が必要です。docker pull quay.io/openshift-release-dev/ocp-release:4.7.19-x86_64
-
oc debug
コマンドに'--image=icr.io
オプションを付けて再試行する。oc debug node/<node-name> --image=icr.io/<namespace>/<image>:<tag>