#配置源
[kubernetes]
name=kubernetes repo
baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=0
#安装基础组件
yum install -y kubelet-1.14.0 kubeadm-1.14.0 kubectl-1.14.0 --disableexcludes=kubernetes
#初始化master
kubeadm init
--apiserver-advertise-address=192.168.10.1
--image-repository registry.aliyuncs.com/google_containers
--kubernetes-version v1.15.0
--service-cidr=10.1.0.0/16
--pod-network-cidr=10.244.0.0/16
注意:初始化了需要重新执行 nohup /usr/local/bin/tiller &
#注册节点
kubeadm join 192.168.10.1:6443 --token 2nm5l9.jtp4zwnvce4yt4oj
--discovery-token-ca-cert-hash sha256:12f628a21e8d4a7262f57d4f21bc85f8802bb717dd6f513bf9d33f254fea3e89