机器准备
机器配置建议:
测试环境 2C4G50G
生产环境 8C16G100G
节点 | 主机名 | IP地址 |
---|---|---|
master | rocky9-1 | 192.168.56.121 (简称121) |
node1 | rocky9-2 | 192.168.56.122(简称122) |
node2 | rocky9-3 | 192.168.56.123(简称123) |
准备工作(三台机器都操作) | ||
1、关闭firewalld | ||
2、关闭selinux | ||
3、修改网卡 | ||
4、修改主机名 | ||
5、添加/etc/hosts(3台) | ||
6、关闭swap | ||
7、chrony时钟同步 | ||
8、将桥接的ipv4流量传递到iptables链 | ||
9、打开端口转发 |
安装containerd(三个节点上操作)
先安装yum-utils工具
yum install -y yum-utils
配置Docker官方的yum仓库,如果做过,可以跳过
yum-config-manager \
--add-repo \
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装containerd
yum install containerd.io -y
启动服务
systemctl enable containerd
systemctl start containerd
生成默认配置
containerd config default > /etc/containerd/config.toml
修改配置
vi /etc/containerd/config.toml
sandbox_image = "[registry.cn-hangzhou.aliyuncs.com/google_containers/pause](http://registry.cn-hangzhou.aliyuncs.com/g