Replies: 5 comments
-
Ok, it seems that I had to Re my bonus bug: It seems that k3s was rescheduling while I was writing the issue before. However, now after I've added the third, k3s keeps the 6 app pods on the first two nodes and does not distribute two back to the third... I'm checking this with Edit: Still after a while k3s doesn't schedule anything back to the third node:
Edit2: Still no change after ~10 minutes |
Beta Was this translation helpful? Give feedback.
-
Ok, re the redistribution, I had to introduce Re automatic node deletion after failure and after some time—is there anything in k3s allowing this? |
Beta Was this translation helpful? Give feedback.
-
Ok, now with the So, why does not k3s reschedules right away when one node goes down without the need to remove it. Is is expected in k8s that some cloud control manager (CCM) would remove the node and adds a new one automatically? I don't have a CCM, hence I ask. |
Beta Was this translation helpful? Give feedback.
-
Now, I've added a new node which successfully joined the existing nodes but the pods are not spreading equally despite having this |
Beta Was this translation helpful? Give feedback.
-
K3s has no way of knowing if the node is down (maintenance, outage, etc) or gone for good; you are responsible for deleting nodes from the cluster if they will not return. If you are using cloud infrastructure you can use Kubernetes cloud providers to delete nodes from the cluster when they are removed from the cloud infrastructure provider. If you are using managed etcd, you should be aware of etcd quorum requirements, which may prevent you from joining new servers to the cluster before old ones have been removed. K3s does not have any special pod scheduling behavior; it behaves the same as any other Kubernetes distribution - both in regards to rescheduling pods away from node that are down, and re-balancing pods when new nodes are added. For the latter, you should node that Kubernetes does not natively re-schedule pods to balance resource utilization, for that you might look at something like the descheduler: https://github.com/kubernetes-sigs/descheduler/blob/master/README.md |
Beta Was this translation helpful? Give feedback.
-
k3s version v1.21.0+k3s1
go version go1.16.2
Linux n2 5.4.0-73-generic # 82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
3 servers
Describe the bug:
I try to simulate a node failure by just un- and reinstalling k3s from the third node
Steps To Reproduce:
Install k3s on 3 nodes with https://gist.github.com/lkj4/5334042a0311784dbdacfad50907f463
(You need to do a terraform apply before which outputs the ips of the created nodes!)
Then, uninstall k3s with k3s' uninstall script from the third node.
Then, install k3s again on the third node. You can just run the above gist again.
Expected behavior:
Node joins again.
Actual behavior:
Additional context / logs:
Bonus bug: Once the last node was removed, I'd expect that k3s is rescheduling the pods to the left two nodes but k3s doesn't do anything.
Beta Was this translation helpful? Give feedback.
All reactions