Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unschedulable Control Plane Nodes. #3907

Closed
mjordan79 opened this issue Apr 7, 2023 · 3 comments
Closed

Unschedulable Control Plane Nodes. #3907

mjordan79 opened this issue Apr 7, 2023 · 3 comments
Labels

Comments

@mjordan79
Copy link

mjordan79 commented Apr 7, 2023

Summary

I use Microk8s in my company for a mid-sized cluster used for development and testing purposes. The cluster is configured with 3 master nodes (control planes) and 4 worker nodes. After the setup, I see the master nodes are schedulable and they will schedule applications. I think that a configuration for making control plane nodes unschedulable would be highly beneficial to a more robust HA configuration, to the point this can be a default setup for master nodes.

Why is this important?

On-premise installations might have the problem of limited resources and controlling them is crucial. In the eventuality of memory pressure for some of the nodes, master nodes can become unreliable and unresponsive, degrading the stability of the cluster.
Making control plane nodes free from scheduling applications, they can reliably continue to do what they're best at: controlling the cluster.

Is documentation also an alternative?

Yes. Considering that making a control plane node unschedulable would not be a "feature" of Microk8s per se, it could be beneficial to have some documentation that explain how to do it reliably and in a correct way. Which taints? Do the extension have the right tolerations to ignore master nodes? Is this an operation that should be done before installing extensions or after? Better to do this in individual nodes before forming the cluster?

@ktsakalozos
Copy link
Member

Hi @mjordan79 thank you for pointing this out. You are right that in order to have a more stable cluster you would better have dedicated nodes to host the control plane. The reason why we do not enforce this policy out of the box is because we expect MicroK8s to be used to small and mid sized clusters. In such clusters we may not have the luxury of dedicated nodes.

Try setting the PreNoSchedule taint to the control plane nodes of a MicroK8s cluster with:

microk8s.kubectl taint nodes --selector=node.kubernetes.io/microk8s-controlplane=microk8s-controlplane cp-node=true:PreferNoSchedule

From: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/

Copy link

stale bot commented Mar 5, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Mar 5, 2024
@stale stale bot closed this as completed Apr 9, 2024
@utamas
Copy link

utamas commented Jan 1, 2025

Oh, cool. It seems to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants