准备一台干干净净的服务器
准备环境
-----------------------------------------------------------------------------------------
为了安全,先把SSH端口默认的22端口修改了修改Port,在服务器的安全策略组中把修改后的端口加进去
重启SSHD服务----------------------------------------------------------------------------------------
修改主机名,并在hosts文件中加一行主机名的解析,重启服务器使配置生效- hostnamectl set-hostname master
- hostnamectl status<br>vi /etc/hosts<br>reboot
复制代码 -----------------------------------------------------------------------------------------
关闭防火墙、selinux、swap- systemctl stop firewalld
- systemctl disable firewalld
- sed -i 's/enforcing/disabled/' /etc/selinux/config
- setenforce 0
- swapoff -a
复制代码 ------------------------------------------------------------------------------------------
将桥接的IPv4流量传递到iptables的链:
[code]cat > /etc/sysctl.d/k8s.conf /etc/yum.repos.d/kubernetes.repo |