https://rancher.com/ logo
Title
j

jolly-waitress-71272

09/16/2022, 5:12 PM
What would the process look like if I had 1 master+worker, 3 worker nodes and I wanted to swap to 3 master+worker, 1 worker? Would there be anything to it more than just draining the two existing nodes, deleting them with
k delete node exampleNode
, uninstalling k3s on them, then following https://rancher.com/docs/k3s/latest/en/installation/ha/#2-launch-server-nodes
c

creamy-pencil-82913

09/16/2022, 5:27 PM
We don’t have masters/workers, we have servers/agents
1. Restart the existing server with --cluster-init to use embedded etcd, if embedded etcd is not currently in use 2. Stop k3s on 2 of the agents, and change the command in the systemd unit on the agents from
agent
to
server
. You may also want to rename the unit from k3s-agent to k3s, to avoid confusion. 3. Start k3s on the former agent nodes, one at a time. Wait for each node to show up as etcd,control-plane in
kubectl get nodes
before moving on to the next.
j

jolly-waitress-71272

09/16/2022, 5:30 PM
I'd update my post with server/agent, but I don't have edit perms.
c

creamy-pencil-82913

09/16/2022, 5:30 PM
nobody can edit after 5 minutes I think
j

jolly-waitress-71272

09/16/2022, 5:31 PM
Must be a slack setting. 😞
c

creamy-pencil-82913

09/16/2022, 5:31 PM
if editing systemd units and such is hard, you can also just uninstall/delete the node then reinstall it as a server.
j

jolly-waitress-71272

09/16/2022, 5:32 PM
Yeah, I just wanted to make sure that if we needed HA that I wasn't burying myself.
c

creamy-pencil-82913

09/16/2022, 5:32 PM
but that’s less efficient, as that will wipe out all the pods, images, and so on. All you really need to do is make sure that the server is using etcd, then change the command from
k3s agent
to
k3s server
j

jolly-waitress-71272

09/16/2022, 5:32 PM
What's the easiest way to very etcd is being used?
Probably that
etcdctl member list
doesn't work?
c

creamy-pencil-82913

09/16/2022, 5:35 PM
look for
etcd
in the roles when you do
kubectl get nodes
j

jolly-waitress-71272

09/16/2022, 5:35 PM
Ah, yeah. I understand what you were saying about
--cluster-init
I definitely need to do that.
c

creamy-pencil-82913

09/16/2022, 5:35 PM
don’t muck about with etcdctl
we don’t bundle etcdctl, since it’s supposed to be 100% managed by k3s
j

jolly-waitress-71272

09/16/2022, 5:36 PM
I only brought it up because I found https://github.com/k3s-io/k3s/issues/2597 and assumed k3s would install it if it was.
That makes sense.
c

creamy-pencil-82913

09/16/2022, 5:37 PM
no, that’s just some community person who was trying to poke at it without really knowing what they were doing
j

jolly-waitress-71272

09/16/2022, 5:37 PM
Yeah. 😄
c

creamy-pencil-82913

09/16/2022, 5:38 PM
also they appear to be using external etcd, not embedded