This message was deleted.
# k3s
a
This message was deleted.
b
A few things: if you're using etcd you should have an odd number of nodes for quorum. etcd does a leader election model meaning that if a majority of nodes go offline the cluster goes read only. So if you have 2 masters and 1 of them goes down it will take the whole cluster with it. the etcd docs have a good fault tolerence reference guide you can use here: https://etcd.io/docs/v3.5/faq/#deployment
Now I would like to turn the original master into an agent node, and then turn two of the existing agents into masters. How should I approach this?
The easiest and best way is just to rebuild the cluster. ideally all of your apps are in manifest files you can just reapply so you wont really lose anything doing it this way. One way you could try is delete and readd nodes as new roles so something like: • Delete the agent nodes that need to be masters from the cluster etcd with
kubectl delete node
• kill and uninstall k3s with the
/usr/local/bin/k3s-killall.sh
and
/usr/local/bin/k3s-uninstall.sh
• Reinstall the k3s server on both of the nodes and use the
K3S_URL
to point to your existing 2 other masters - at this point you should have 4 master nodes. • follow step 1 and 2 again on the server you want to turn into an agent • install k3s agent and use any master node (or better yet a loadbalancer) for the
K3S_URL
.
f
This was very informative, thanks so much!
139 Views