kubernetes集群动态添加节点
2016-08-10 00:00
1041 查看
kubernetes集群动态添加节点:
Adding a member is a two step process:
Add the new member to the cluster via the members API or the
Start the new member with the new cluster configuration, including a list of the updated members (existing members + the new member).
Using
The new member will run as a part of the cluster and immediately begin catching up with the rest of the cluster.
If you are adding multiple members the best practice is to configure a single member at a time and verify it starts correctly before adding more new members. If you add a new member to a 1-node cluster, the cluster cannot make progress before the new member starts because it needs two members as majority to agree on the consensus. You will only see this behavior between the time
Adding a member is a two step process:
Add the new member to the cluster via the members API or the
etcdctl member addcommand.
Start the new member with the new cluster configuration, including a list of the updated members (existing members + the new member).
Using
etcdctllet’s add the new member to the cluster by specifying its name and advertised peer URLs:
$ etcdctl member add infra3 http://10.0.1.13:2380 added member 9bf1b35fc7761a23 to cluster ETCD_NAME="infra3" ETCD_INITIAL_CLUSTER="infra0=http://10.0.1.10:2380,infra1=http://10.0.1.11:2380,infra2=http://10.0.1.12:2380,infra3=http://10.0.1.13:2380" ETCD_INITIAL_CLUSTER_STATE=existing
etcdctlhas informed the cluster about the new member and printed out the environment variables needed to successfully start it. Now start the new etcd process with the relevant flags for the new member:
$ export ETCD_NAME="infra3" $ export ETCD_INITIAL_CLUSTER="infra0=http://10.0.1.10:2380,infra1=http://10.0.1.11:2380,infra2=http://10.0.1.12:2380,infra3=http://10.0.1.13:2380" $ export ETCD_INITIAL_CLUSTER_STATE=existing $ etcd -listen-client-urls http://10.0.1.13:2379 -advertise-client-urls http://10.0.1.13:2379 -listen-peer-urls http://10.0.1.13:2380 -initial-advertise-peer-urls http://10.0.1.13:2380 -data-dir %data_dir%
The new member will run as a part of the cluster and immediately begin catching up with the rest of the cluster.
If you are adding multiple members the best practice is to configure a single member at a time and verify it starts correctly before adding more new members. If you add a new member to a 1-node cluster, the cluster cannot make progress before the new member starts because it needs two members as majority to agree on the consensus. You will only see this behavior between the time
etcdctl member addinforms the cluster about the new member and the new member successfully establishing a connection to the existing one.
相关文章推荐
- centos6.5上安装docker
- 在Kubernetes上搭建EFK(Fluentd+Elasticsearch+Kibana)
- 在kubernetes上实现tomcat日志的持久化
- docker容器的网络信息查看
- openstack kilo-with-dokcer
- 在windows下的安装Docker的教程
- 8个你可能不知道的Docker知识
- mysql 5.7 docker 主从复制架构搭建教程
- 在Docker中自动化部署Ruby on Rails的教程
- 搭建基于Docker的PHP开发环境的详细教程
- Docker容器的Tengine实践
- 利用OpenVSwitch在多台主机上部署Docker的教程
- ubuntu14.04+docker的安装及使用
- Docker 清理命令集锦
- 再Docker中架设完整的WordPress站点全攻略
- 基于 Docker 开发 NodeJS 应用
- 使用Docker来加速构建Android应用的基本部署思路解析
- 在Docker上部署Python的Flask框架的教程
- 在Docker上开始部署Python应用的教程