-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
single-to-multi-master doc: Create all master instances groups at first #2774
Conversation
Hi @dtan4. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@k8s-bot ok to test |
@MrTrustor can you comment on this? I have not done this before, so approving changes to the doc would need me to go through the documentation |
I have not tested this procedure since writing this doc, so the behavior of Kops may have changed since then. The proposed changes seem reasonable enough. |
@MrTrustor that would be amazing if you could, no worries if you cannot. @dtan4 can you outline how you have tested this process? |
I've upgraded current cluster with the steps below: 1. create single-master clustercluster name:
2. create instance groups(ap-northeast-1 users can use 2 AZs only...) kops create ig master-ap-northeast-1b --subnet ap-northeast-1b --role Master
# change maxSize, minSize to 0
kops create ig master-ap-northeast-1c-2 --subnet ap-northeast-1c --role Master 3. add second mastera. edit clusterkops edit cluster add this to both - instanceGroup: master-ap-northeast-1b
name: b
- instanceGroup: master-ap-northeast-1c-2
name: c2 b. add etcd memberetcd Pod: $ kubectl get po --namespace kube-system | grep etcd
etcd-server-events-ip-10-1-72-52.ap-northeast-1.compute.internal 1/1 Running 0 70d
etcd-server-ip-10-1-72-52.ap-northeast-1.compute.internal 1/1 Running 0 70d kubectl --namespace=kube-system exec etcd-server-ip-10-1-72-52.ap-northeast-1.compute.internal -- etcdctl member add etcd-b http://etcd-b.internal.cluster.example.com:2380
kubectl --namespace=kube-system exec etcd-server-events-ip-10-1-72-52.ap-northeast-1.compute.internal -- etcdctl --endpoint http://127.0.0.1:4002 member add etcd-events-b http://etcd-events-b.internal.cluster.example.com:2381 c. update clusterkops update cluster --yes d. update etcd in new masterssh -i ~/.ssh/key.rsa admin@<new master> sudo -i
systemctl stop kubelet
systemctl stop protokube
sudo vim /etc/kubernetes/manifests/etcd-events.manifest
sudo vim /etc/kubernetes/manifests/etcd.manifest
docker stop $(docker ps | grep "etcd:2.2.1" | awk '{print $1}')
rm -r /mnt/<id>/var/etcd/data-events/member/
rm -r /mnt/<id>/var/etcd/data/member/
systemctl start kubelet
exit
exit 4. add third mastera. increase ASG size of third-master instance group# increase minSize and maxSize to 1
kops edit ig master-ap-northeast-1c-2 b. add etcd memberkubectl --namespace=kube-system exec etcd-server-ip-10-1-89-92.ap-northeast-1.compute.internal -- etcdctl member add etcd-c2 http://etcd-c2.internal.cluster.example.com:2380
kubectl --namespace=kube-system exec etcd-server-events-ip-10-1-89-92.ap-northeast-1.compute.internal -- etcdctl --endpoint http://127.0.0.1:4002 member add etcd-events-c2 http://etcd-events-c2.internal.cluster.example.com:2381 c. update clusterkops update cluster --yes d. update etcd in new masterssh -i ~/.ssh/key.rsa admin@<new master> sudo -i
systemctl stop kubelet
systemctl stop protokube
sudo vim /etc/kubernetes/manifests/etcd-events.manifest
sudo vim /etc/kubernetes/manifests/etcd.manifest
docker stop $(docker ps | grep "etcd:2.2.1" | awk '{print $1}')
rm -r /mnt/<id>/var/etcd/data-events/member/
rm -r /mnt/<id>/var/etcd/data/member/
systemctl start kubelet
exit
exit |
Thanks, @dtan4, let's get this in an iterate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Why
Current single-to-multi-master says:
.spec.etcdClusters
, even if we have not created it yet.I tried to single-to-multi master migration with the above document, but I got an the below error:
kops update cluster
does not accept nonexist instance group...After creating the third master instance group with empty size, it worked well and I could finish migration successfully.
What
Revise document to create all master instance groups at first.
This change is![Reviewable](https://camo.githubusercontent.com/bdad2d5a4be7a00dc3b2426ea57eabd73ef84d8ed5ee05653b2f1501b6ea93ab/68747470733a2f2f72657669657761626c652e6b756265726e657465732e696f2f7265766965775f627574746f6e2e737667)