k8s-1.9.1-步骤四(安装etcd二进制服务)

版权声明:本文为博主原创文章,未经博主允许不得转载。http://www.glshuyuan.club/ https://blog.csdn.net/weixin_35494719/article/details/79890160
----------------------------------------------------------------------------------------------------------------------------
执行主机: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

博主设置当前文章不允许评论。

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试