Kubernetes安装部署图文记录及错误判断2
1、所有机器上执行以下命令,准备安装环境:(注意是所有机器,主机master,从机node都要安装)
1.1、安装epel-release源
yum -y install epel-release
1.2、所有机器关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
#查看防火墙状态
firewall-cmd --state
2、现在开始master主机上192.168.26.227安装kubernetes Master
2.1、使用yum安装etcd、kubernetes-master
yum -y install etcd kubernetes-master
2.2、编辑:vi /etc/etcd/etcd.conf文件,修改结果如下:
2.3、配置:vi /etc/kubernetes/apiserver文件,配置结果如下:
2.4、启动etcd、kube-apiserver、kube-controller-manager、kube-scheduler等服务,并设置开机启动。
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler; do systemctl restart $SERVICES;systemctl enable $SERVICES;systemctl status $SERVICES ; done
2.5、在etcd中定义flannel网络
etcdctl mk /atomic.io/network/config '{"Network":"172.17.0.0/16"}'