k8s-1.9.1-步骤四(安装etcd二进制服务)
----------------------------------------------------------------------------------------------------------------------------执行主机:192.168.1.15or16or18查看-------------------------------------------------
·
----------------------------------------------------------------------------------------------------------------------------
执行主机:192.168.1.15or16or18
查看
----------------------------------------------------------------------------------------------------------------------------
执行主机:192.168.1.15and16and18
将etcd二进制服务放入到可执行目录
----------------------------------------------------------------------------------------------------------------------------
执行主机:192.168.1.15and16and18
启动测试
----------------------------------------------------------------------------------------------------------------------------
执行主机:192.168.1.15or16or18
启动三个主机的etcd
for node in {k8s-master-1,k8s-master-2,k8s-master-3};do ssh ${node} "systemctl daemon-reload && systemctl restart etcd"; done
----------------------------------------------------------------------------------------------------------------------------
执行主机:192.168.1.15or16or18
测试etcd集群是否正常
etcdctl \ --ca-file=/etc/kubernetes/ssl/k8s-root-ca.pem\ --cert-file=/etc/kubernetes/ssl/kubernetes.pem \ --key-file=/etc/kubernetes/ssl/kubernetes-key.pem \ cluster-health
----------------------------------------------------------------------------------------------------------------------------
执行主机:192.168.1.15or16or18
设置集群网络范围
etcdctl --endpoints=https://192.168.1.15:2379,https://192.168.1.16:2379,https://192.168.1.18:2379 \
--ca-file=/etc/kubernetes/ssl/k8s-root-ca.pem \
--cert-file=/etc/kubernetes/ssl/kubernetes.pem \
--key-file=/etc/kubernetes/ssl/kubernetes-key.pem \
mkdir /kubernetes/network
----------------------------------------------------------------------------------------------------------------------------
执行主机:192.168.1.15or16or18
etcdctl --endpoints=https://192.168..1.15:2379,https://192.168.1.16:2379,https://192.168.1.18:2379 \
--ca-file=/etc/kubernetes/ssl/k8s-root-ca.pem\
--cert-file=/etc/kubernetes/ssl/kubernetes.pem \
--key-file=/etc/kubernetes/ssl/kubernetes-key.pem \
mk /kubernetes/network/config '{ "Network": "10.254.0.0/16", "Backend": { "Type": "vxlan", "VNI": 1 }}'
----------------------------------------------------------------------------------------------------------------------------
执行主机:192.168.1.15adn16and18
启动docker
systemctl restart docker
更多推荐
已为社区贡献7条内容
所有评论(0)