下载镜像提示 output: Error response from daemon: Get https://k8s.gcr.io/v2/: x509: certificate has expired

出现这个提示可以改一下镜像仓库地址

问题:

[root@master1 ~]# kubeadm config images pull --config kubeadm-config.yaml
W0920 01:12:10.794030    2723 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
failed to pull image "k8s.gcr.io/kube-apiserver:v1.18.2": output: Error response from daemon: Get https://k8s.gcr.io/v2/: x509: certificate has expired or is not yet valid
, error: exit status 1
To see the stack trace of this error execute with --v=5 or higher

解决
编辑 kubeadm-config.yaml 文件改镜像仓库

dns:
  type: CoreDNS
etcd:
  local:
    dataDir: /var/lib/etcd
imageRepository: registry.aliyuncs.com/google_containers      # 改完之后的镜像仓库地址
kind: ClusterConfiguration
kubernetesVersion: v1.18.2
networking:
  dnsDomain: cluster.local
  podSubnet: "10.244.0.0/16"
  serviceSubnet: 10.96.0.0/12
scheduler: {}
上一篇:搭建一个完整的K8S集群-------基于CentOS 8系统


下一篇:让Dapper读写分离