1、环境初始化(所有节点都要操作)
(1) 此环境下安装k8s集群要求centos版本在7.5或以上。
[root@Master ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
(2)添加主机名解析
[root@Master ~]# vim /etc/hosts
192.168.194.100 Master
192.168.194.101 node1
192.168.194.103 node3
(3)时间同步
1)使用软件包安装工具安装chrony和ntp
- Arch Linux系列:
sudo pacman -S ntp chrony - Debian系列:
sudo apt install ntp chrony - Red Hat系列:
sudo yum install ntp chrony
或者
sudo dnf install ntp chrony