192.168.33.15 master-1 master
192.168.33.16 node-1 slave
192.168.33.17 node-2 slave
echo '
192.168.33.15 master-1
192.168.33.16 node-1
192.168.33.17 node-2' >> /etc/hosts
CentOS版本:
1、关闭firewalld和selinux
所有机器上执行:
systemctl stop firewalld && systemctl disable firewalld
执行:
firewall-cmd --state #查看默认防火墙状态(关闭后显示not running,开启后显示running)
关闭selinux 需要重启机器
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
重启后输入 sestatus 查看selinux状态,此时应该显示disabled
关闭swap: swapoff -a
2、时间同步
yum -y install ntp
ntptime
timedatectl
systemctl enable ntpd
systemctl restart ntpd.service
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
3、到网盘上下载k8s_images.tar.bz2压缩包
master节点操作
链接:https://pan.baidu.com/s/1ExMT7DzpardBWarYwSaM9Q#list/path=%2F 密码:otpq
k8s_images.tar.bz2包下载后上传到192.168.33.15服务器的/root目录下
配置互信 生成ssh 密钥对
[root@master-1 ~]# ssh-keygen
把本地的ssh公钥文件安装到远程主机对应的账户
[root@master-1 ~]# ssh-copy-id master-1
[ro