K8s cluster installation
3台服务器(centos 7)1台master 10.211.55.6(A)2台node 10.211.55.7 (B) 10.211.55.8(C)以下A、B、C都要执行1 安装epel-release源# yum -y install epel-release2 关闭防火墙服务和selinx# systemctl stop firewalld# systemctl disable firew
3台服务器(centos 7)
1台master 10.211.55.6(A)
2台node 10.211.55.7 (B) 10.211.55.8(C)
以下A、B、C都要执行
1 安装epel-release源
# yum -y install epel-release
2 关闭防火墙服务和selinx
# systemctl stop firewalld
# systemctl disable firewalld
# setenforce 0
以下在master (A) 上执行
3 安装etcd和kubernetes-master
# yum -y install etcd kubernetes-master
5 编辑/etc/kubernetes/apiserver
6 启动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
测试master服务
7 在etcd中定义flannel网络
# etcdctl mk /atomic.io/network/config '{"Network":"172.17.0.0/16"}'
以下在node (B、C) 上执行
8 安装flannel和kubernetes-node
# yum -y install flannel kubernetes-node
10 修改/etc/kubernetes/config
11 修改/etc/kubernetes/kubelet
12 在所有Node节点上启动kube-proxy,kubelet,docker,flanneld等服务,并设置开机启动。
# for SERVICES in kube-proxy kubelet docker flanneld;do systemctl restart $SERVICES;systemctl enable $SERVICES;systemctl status $SERVICES; done
以下在master (A) 上执行
13 验证集群是否安装成功
# kubectl get node
更多推荐
所有评论(0)