I am wanting to to know if I understand how k3s wo...
# k3s
f
I am wanting to to know if I understand how k3s works. Let’s say I have 3 physical devices. Each device runs 1 master node and 1 worker node, so 6 nodes total. I am running traefik on k3s as well as a postgres database. Lets say the postgres database gets incredibly busy and starts hogging most of the cpu/mem on one of the physical devices. Will k3s automagically migrate the traefik app to a node with more resources, or would this be taken care of by Replica Sets which if I understand correctly will run 1 instance on each of the worker nodes?
c
no. hosts are either server or agent. You cannot run both on one host.
servers also include kubelet and containerd, so they are usable as a normal Kubernetes node. they just run more components than an agent.
Please reference the architecture docs on the website.
f
I have been using this guide. Should I be using another one? https://docs.k3s.io/
c
That's the correct page yes
What did you see that gave you the impression that you could run both server and agent on a single node?
f
Oh I must have not phrased my question correctly. I have 3 nodes that have a master label, and 3 nodes labeled as workers.
c
I'm confused, you said you only have 3 physical devices. That should give you 3 nodes.
f
I have 3 physical devices that I am running vms on with k3s installed. I have 6 total nodes running on 6 vms that are split onto those physics devices. 3 vms are labeled master and 3 vms are labeled workers.
c
Hmm. I'm not sure what advantage that gives you if each pair of servers and agents is on the same underlying hardware but sure.
To answer your question about rebalancing things if something starts using more resources, no. Kubernetes does not do that
f
Will check it out. Thanks for the links, and thank you for answering my most likely silly questions. I am very green when it comes to docker or kubernetes. By day I am a senior network engineer and have been doing networking for a living for almost 2 decades. By night I know just enough docker and python to be dangerous and am almost lost on my journey to learn kubernetes. Off to read the architecture one. Have a great day and I appreciate your attention.