Failed to pull image "registry.redhat.io/rhosp-rhel9/openstack-rabbitmq:17.0":
rpc error: code = Unknown desc = unable to retrieve auth token: invalid
username/password: unauthorized: Please login to the Red Hat Registry using
your Customer Portal credentials.
Failed to pull image "registry.redhat.io/rhosp-rhel9/openstack-rabbitmq:17.0":
rpc error: code = Unknown desc = unable to retrieve auth token: invalid
username/password: unauthorized: Please login to the Red Hat Registry using
your Customer Portal credentials.
Copy to ClipboardCopied!Toggle word wrapToggle overflow
一个失败的 pod 示例:
Normal Scheduled 3m40s default-scheduler Successfully assigned openstack/rabbitmq-server-0 to worker0
Normal AddedInterface 3m38s multus Add eth0 [10.101.0.41/23] from ovn-kubernetes
Warning Failed 2m16s (x6 over 3m38s) kubelet Error: ImagePullBackOff
Normal Pulling 2m5s (x4 over 3m38s) kubelet Pulling image "registry.redhat.io/rhosp-rhel9/openstack-rabbitmq:17.0"
Warning Failed 2m5s (x4 over 3m38s) kubelet Failed to pull image "registry.redhat.io/rhosp-rhel9/openstack-rabbitmq:17.0": rpc error: code ... can be found here: https://access.redhat.com/RegistryAuthentication
Warning Failed 2m5s (x4 over 3m38s) kubelet Error: ErrImagePull
Normal BackOff 110s (x7 over 3m38s) kubelet Back-off pulling image "registry.redhat.io/rhosp-rhel9/openstack-rabbitmq:17.0"
Normal Scheduled 3m40s default-scheduler Successfully assigned openstack/rabbitmq-server-0 to worker0
Normal AddedInterface 3m38s multus Add eth0 [10.101.0.41/23] from ovn-kubernetes
Warning Failed 2m16s (x6 over 3m38s) kubelet Error: ImagePullBackOff
Normal Pulling 2m5s (x4 over 3m38s) kubelet Pulling image "registry.redhat.io/rhosp-rhel9/openstack-rabbitmq:17.0"
Warning Failed 2m5s (x4 over 3m38s) kubelet Failed to pull image "registry.redhat.io/rhosp-rhel9/openstack-rabbitmq:17.0": rpc error: code ... can be found here: https://access.redhat.com/RegistryAuthentication
Warning Failed 2m5s (x4 over 3m38s) kubelet Error: ErrImagePull
Normal BackOff 110s (x7 over 3m38s) kubelet Back-off pulling image "registry.redhat.io/rhosp-rhel9/openstack-rabbitmq:17.0"
Copy to ClipboardCopied!Toggle word wrapToggle overflow
要解决这个问题,您需要来自 官方红帽控制台站点 的有效 pull-secret,将此 pull secret 存储在本地可访问 Kubernetes API (服务节点)的机器上,然后运行:
oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=<pull_secret_location.json>
oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=<pull_secret_location.json>
Copy to ClipboardCopied!Toggle word wrapToggle overflow
以上命令将在所有集群计算节点上提供身份验证信息,然后触发新的 pod 部署来拉取容器镜像:
kubectl delete pod rabbitmq-server-0 -n openstack
kubectl delete pod rabbitmq-server-0 -n openstack
Copy to ClipboardCopied!Toggle word wrapToggle overflow
pod 应该可以成功拉取(pull)镜像。有关哪些容器 registry 需要什么类型身份验证的更多信息,请检查 官方文档。