Loading

k3s安装之后无法正常运行

问题就出在镜像拉取失败

创建/etc/rancher/k3s/registries.yaml文件并配置镜像即可

mirrors:
  # Docker Hub 镜像(最关键)
  docker.io:
    endpoint:
      - "https://你的专属域名.xuanyuan.run"

  # Kubernetes 官方镜像(新标准)
  registry.k8s.io:
    endpoint:
      - "https://你的专属域名-k8s.xuanyuan.run"

  # Rancher 镜像(可选,实际仍来自 docker.io)
  # 注意:rancher/* 镜像实际 registry 仍然是 docker.io,containerd 并不会把 rancher 当作独立 registry
  # 是否配置该项不影响拉取结果,关键仍是 docker.io 的加速配置
  rancher:
    endpoint:
      - "https://你的专属域名.xuanyuan.run"

  # quay.io 镜像
  quay.io:
    endpoint:
      - "https://你的专属域名-quay.xuanyuan.run"
      - "https://quay.mirrors.aliyun.com"
      - "https://quay.io"

可用的镜像站,部分可能需要付费
https://xuanyuan.cloud/
https://1ms.run/

posted @ 2026-01-16 13:38  shih945  阅读(0)  评论(0)    收藏  举报