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"}'

 

》》》》》》》》以上master主机上的配置安装什么的都弄完

posted @ 2022-03-30 17:23  飞雪飘鸿  阅读(27)  评论(0编辑  收藏  举报
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL