
dyrnq/coredns本镜像为从k8s.gcr.io/coredns/coredns:v*同步的CoreDNS官方镜像,主要用于解决Kubernetes集群部署过程中,因国内网络环境无法直接拉取k8s.gcr.io仓库镜像导致的CoreDNS镜像拉取失败问题。通过指定正确的镜像仓库配置,可确保kubeadm初始化集群时顺利获取CoreDNS组件镜像。
适用于使用kubeadm工具部署Kubernetes集群的场景,特别是在执行kubeadm config images pull或kubeadm init时遇到以下错误的情况:
failed to pull image "registry.aliyuncs.com/google_containers/coredns:v1.8.4": output: Error response from daemon: manifest for registry.aliyuncs.com/google_containers/coredns:v1.8.4 not found: manifest unknown: manifest unknown
当使用默认镜像仓库(如registry.aliyuncs.com/google_containers)部署Kubernetes时,可能出现CoreDNS镜像拉取失败,错误信息如下:
bashkubeadm config images pull --image-repository registry.aliyuncs.com/google_containers [config/images] Pulled registry.aliyuncs.com/google_containers/kube-apiserver:v1.22.0 [config/images] Pulled registry.aliyuncs.com/google_containers/kube-controller-manager:v1.22.0 [config/images] Pulled registry.aliyuncs.com/google_containers/kube-scheduler:v1.22.0 [config/images] Pulled registry.aliyuncs.com/google_containers/kube-proxy:v1.22.0 [config/images] Pulled registry.aliyuncs.com/google_containers/pause:3.5 [config/images] Pulled registry.aliyuncs.com/google_containers/etcd:3.5.0-0 failed to pull image "registry.aliyuncs.com/google_containers/coredns:v1.8.4": output: Error response from daemon: manifest for registry.aliyuncs.com/google_containers/coredns:v1.8.4 not found: manifest unknown: manifest unknown , error: exit status 1
通过修改kubeadm配置文件,指定CoreDNS镜像仓库地址,步骤如下:
yamlapiVersion: kubeadm.k8s.io/v1beta2 kind: InitConfiguration bootstrapTokens: - token: abcdef.0123456789abcdef ttl: 0h localAPIEndpoint: advertiseAddress: 192.168.88.11 # 替换为实际节点IP bindPort: 6443 --- apiVersion: kubeadm.k8s.io/v1beta2 kind: ClusterConfiguration kubernetesVersion: v1.22.0 # 替换为目标Kubernetes版本 imageRepository: registry.aliyuncs.com/google_containers # 其他组件镜像仓库 networking: podSubnet: 10.244.0.0/16 # 替换为实际Pod子网 dns: imageRepository: docker.io/dyrnq # 指定CoreDNS镜像仓库 --- apiVersion: kubeproxy.config.k8s.io/v1alpha1 kind: KubeProxyConfiguration mode: "ipvs"
bashkubeadm config --config=kubeadm-config.yaml images list
预期输出应包含正确的CoreDNS镜像地址:
registry.aliyuncs.com/google_containers/kube-apiserver:v1.22.0 registry.aliyuncs.com/google_containers/kube-controller-manager:v1.22.0 registry.aliyuncs.com/google_containers/kube-scheduler:v1.22.0 registry.aliyuncs.com/google_containers/kube-proxy:v1.22.0 registry.aliyuncs.com/google_containers/pause:3.5 registry.aliyuncs.com/google_containers/etcd:3.5.0-0 docker.io/dyrnq/coredns:v1.8.4 # CoreDNS镜像已指向正确仓库
bashkubeadm init --config=kubeadm-config.yaml
dns.imageRepository配置是否正确,确保目标仓库存在对应版本镜像





manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务