简体   繁体   中英

kubernetes : migrate from “stacked control plane + etc nodes” to “cluster with external etcd nodes”

I will probably ask a stupid question ( after reading official kubernetes documentation), but here it is my question :

First, I setuped a kubeadm cluster with 3 stacked control plane nodes & etcd + 1 load balancer (The etcd members and control plane nodes are co-located) + n worker.

# kubectl get nodes
NAME                                             STATUS   ROLES    AGE   VERSION
pp-tmp-test20.xxx   Ready    master   17h   v1.15.1
pp-tmp-test21.xxx   Ready    master   15h   v1.15.2
pp-tmp-test22.xxx   Ready    master   15h   v1.15.2
pp-tmp-test23.xxx   Ready    worker   14h   v1.15.2
pp-tmp-test24.xxx   Ready    worker   15h   v1.15.2

Is there a way to migrate from this topology to a "kubadm cluster with external etcd cluster" without delete my actual cluster. Migrate to 3 stacked control plane nodes + 3 etcd nodes + 1 load balancer + n worker.

Or I have to setup a new cluster ?

I think I found my answer in the official doc ( https://k0s.io/docs/setup/independent/high-availability/ ) :

" Before proceeding, you should carefully consider which approach best meets the needs of your applications and environment . This comparison topic outlines the advantages and disadvantages of each topology."

"Setting up a cluster with external etcd nodes is similar to the procedure used for stacked etcd with the exception that you should setup etcd first , and you should pass the etcd information in the kubeadm config file"

Thank you very much for the help

Best regards Vincent

Yes, you can setup etcd nodes now on external system and update the below parameters on kube-apiserver.yaml file. The manifest file should be available on /etc/kubernetes/manifests directory on the control plane nodes.

     --etcd-servers=https://<IP address of new etcd server>:2379

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM