为什么我发布的pod下载资源总是不愿意去使用国内的镜像

环境信息:
RKE2 版本:
v1.26.4+k3s1
节点 CPU 架构,操作系统和版本:
乌班图 22.04
集群配置:

问题描述:
Events:
Type Reason Age From Message


Normal Scheduled 2m18s default-scheduler Successfully assigned local-path-storage/local-path-provisioner-86c74f456-zmgr9 to kmsfy-a
Warning FailedCreatePodSandBox 36s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get sandbox image “registry.k8s.io/pause:3.8”: failed to pull image “registry.k8s.io/pause:3.8”: failed to pull and unpack image “registry.k8s.io/pause:3.8”: failed to resolve reference “registry.k8s.io/pause:3.8”: failed to do request: Head “https://asia-east1-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.8”: Unable to connect
重现步骤:

  • 安装 RKE2 的命令:

预期结果:

实际结果:

日志

老哥补充点上下文吧,要不不太知道你这是啥情况

我解决了大佬,我手动去改/etc/rancer/rke2/registries.yaml 修改镜像源没有用,还是要创建集群时就指定mirror才行