标签:后台进程 install 节点 connect etcd 服务 ast 集群部署 cte
安装版本:
centos version: 7.4 docker version: 18.03.1-ce kubectl version: v1.10.1 etcdctl version: 3.2.18 Flannel version: v0.10.0
基本架构:
IP地址 | 主机名 | 服务 |
10.200.3.105 | k8s-master | etcd/docker/kube-apiserver/kube-controller-manager/kube-scheduler/flannel |
10.200.3.106 | k8s-node-1 | etcd/docker/kube-proxy/kubelet/flannel |
10.200.3.107 | k8s-node-2 | etcd/docker/kube-proxy/kubelet/flannel |
1. 关闭SELinux和防火墙
#systemctl disable firewalld.service #systemctl stop firewalld.service
2.设置主机名:
# hostnamectl --static set-hostname k8s-master # hostnamectl --static set-hostname k8s-node-1 # hostnamectl --static set-hostname k8s-node-2
3.设置/etc/hosts保证主机名能够解析
10.200.3.105 k8s-master 10.200.3.106 k8s-node-1 10.200.3.107 k8s-node-2
4. 设置部署节点到其它所有节点的SSH免密码登录
[root@k8s-master ~]# ssh-keygen -t rsa [root@k8s-master ~]# ssh-copy-id k8s-master [root@k8s-master ~]# ssh-copy-id k8s-node-1 [root@k8s-master ~]# ssh-copy-id k8s-node-2
5.安装Docker
第一步:使用国内Docker源
[root@k8s-master ~]# cd /etc/yum.repos.d/ [root@k8s-master yum.repos.d]# wget > https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo --2018-05-30 17:20:48-- https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 103.15.99.96, 103.15.99.93, 103.15.99.94, ... Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|103.15.99.96|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2640 (2.6K) [application/octet-stream] Saving to: ‘docker-ce.repo’ 100%[===========================================================================================>] 2,640 --.-K/s in 0s 2018-05-30 17:20:49 (63.8 MB/s) - ‘docker-ce.repo’ saved [2640/2640]
第二步:Docker安装:
[root@k8s-master yum.repos.d]# yum install -y docker-ce
第三步:启动后台进程:
[root@k8s-master ~]# systemctl start docker
6.准备部署目录
#mkdir -p /opt/kubernetes/{cfg,bin,ssl,log}
标签:后台进程 install 节点 connect etcd 服务 ast 集群部署 cte
原文地址:https://www.cnblogs.com/saneri/p/9119336.html