安装containerd 容器运行时
[root@k8sm1 ~]# yum install -y containerd.io-1.6.6
生成containerd 配置文件
创建配置文件存储目录
[root@k8sm1 ~]# mkdir -p /etc/containerd
生成配置文件
[root@k8sm1 ~]# containerd config default > /etc/containerd/config.toml
修改配置文件
修改sandbox_image = "registry.aliyuncs.com/google_containers/pause:3.8"
SystemdCgroup = true
启动containerd 并设置自启
[root@k8sm1 ~]# systemctl enable containerd --now
配置containerd 加速
创建加速器配置文件
[root@k8sm1 ~]# mkdir -p /etc/containerd/certs.d/docker.io
[root@k8sm1 ~]# vim /etc/containerd/certs.d/docker.io/hosts.toml
[host."https://xxx.mirror.aliyuncs.com",host."https://registry.docker-cn.com"]
capabilities = ["pull","push"]
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
重启containerd
安装docker
[root@k8sm1 ~]# yum install -y docker-ce
[root@k8sm1 ~]# systemctl enable docker --now
配置docker 加速器
vim /etc/docker/daemon.json
安装k8s 基础软件包
[root@k8sm1~]# yum install -y kubelet-1.25.0 kubeadm-1.25.0 kubectl-1.25.0
配置kubelet 开机自启
[root@k8sm1 ~]# systemctl enable kubelet
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
[root@k8sm1 ~]#