一、环境架构与部署准备 1.集群节点架构与各节点所需安装的服务如下图:
2.安装环境与软件版本:Master:
所需软件:docker-ce 17.03、kubelet1.11.1、kubeadm1.11.1、kubectl1.11.1
所需镜像:
mirrorgooglecontainers/kube-proxy-amd64:v1.11.1、mirrorgooglecontainers/kube-scheduler-amd64:v1.11.1、mirrorgooglecontainers/kube-controller-manager-amd64:v1.11.1、mirrorgooglecontainers/kube-apiserver-amd64:v1.11.1、coredns/coredns:1.1.3、mirrorgooglecontainers/etcd-amd64:3.2.18、mirrorgooglecontainers/pause:3.1、registry.cn-hangzhou.aliyuncs.com/readygood/flannel:v0.10.0-amd64
Node:
所需软件:docker-ce 17.03、kubelet1.11.1、kubeadm1.11.1
所需镜像:mirrorgooglecontainers/kube-proxy-amd64:v1.11.1、mirrorgooglecontainers/pause:3.1、registry.cn-hangzhou.aliyuncs.com/readygood/flannel:v0.10.0-amd64
二、部署Master 1.关闭Firewall和SELinux由于kubeadm在初始化时会自动生成ipv4规则,所以尽量在部署前关闭防火墙。
2.配置阿里云的Kubernetes镜像和Docker-ce镜像并安装K8s yum源配置:
[k8s] name=k8s baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/ gpgchecke=1 gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg enabled=1