07.尚硅谷_搭建K8s集群(kubeadm方式)-部署master节点_哔哩哔哩_bilibili
视频里的版本只有1.17而现在(2023.10.20)kubernetes最新版本是1.28,需要搭载cri-dockerd,
先去网站下载了对应的rpm包cri-dockerd下载https://github.com/Mirantis/cri-dockerd/releases/tag/v0.3.6载了rpm包,然后由于下载这个之前需要安装一个前置包containerd.io,到网站下载了rpm包contained安装https://download.docker.com/linux/centos/7/x86_64/stable/Packages/运行下列命令启动cri-docker
bash
systemctl daemon-reload && systemctl enable cri-docker.socket
systemctl start cri-docker.socket cri-docker
运行下列命令初始化kubeadm
注意版本不是视频里的而是改成了1.28.2
bash
kubeadm init --apiserver-advertise-address=192.168.211.10 --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.28.2 --service-cidr=10.96.0.0/12 --pod-network-cidr=10.244.0.0/16
运行成功!