部署环境
操作系统:CentOS 7
Kubernetes版本: v1.5.2
Etcd版本:
Docker版本:
第一章、安装Master
内核更新:
yum update -yKUBE_ETCD_SERVERS="--etcd-servers=http://47.52.159.14:2379"
KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0"
systemctl status kube-scheduler
第二章、安装Node
内核更新:
yum update -y
关闭防火墙
systemctl disable firewalld
systemctl stop firewalld
2、安装kubernetes
yum install -y kubernetes
3、安装Docker
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh --mirror Aliyun
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://573b0ee5.m.daocloud.io
systemctl restart docker.service
4、配置kubelet
vim /usr/lib/systemd/system/kubelet.service
无需配置
vim /etc/kubernetes/config
修改配置:
KUBE_MASTER="--master=http://47.52.159.14:8080"
vim /etc/kubernetes/kubelet
修改配置:
KUBELET_API_SERVER="--api-servers=http://47.52.159.14:8080"
systemctl daemon-reload
systemctl enable kubelet
systemctl start kubelet
systemctl status kubelet
5、配置kube-proxy
vim /usr/lib/systemd/system/kube-proxy.service
修改配置:
添加:Requires=network.service
vim /etc/kubernetes/proxy
无需修改
systemctl daemon-reload
systemctl enable kube-proxy
systemctl start kube-proxy
systemctl status kube-proxy