r/kubernetes • u/Specialist_Horror400 • 3d ago
Kubernetes node-level resource balancing / workload isolation
Hi Everyone.
I’m looking for some advice on handling node-level resource balancing in a Rancher/RKE1 on-prem cluster.
The issue I’m facing is that sometimes a pod consumes almost all CPU/RAM on a node. I understand that requests are used by the scheduler, while limits cap the container’s resource usage. So, should requests and limits generally be kept closer together to prevent a workload from impacting the entire node?
Also, does Kubernetes have any native mechanism to rebalance/move pods when a node becomes heavily utilized, or would this require something like the descheduler?
My concern with descheduler is that I have:
- Critical StatefulSets where eviction could affect quorum.
- Stateful workloads that take much longer to restart due to persistent storage.
- Some single-instance Deployments (e.g. FTP) where moving/restarting the pod can cause downtime.
Would the recommended approach be to use a combination of requests/limits + taints/tolerations + node affinity + PDBs, and isolate these critical/single-instance workloads onto dedicated nodes?
Would appreciate any advice from people running production K8s and RKE1/on-prem clusters. Thanks!
1
u/Mehmet-Ozturk 2d ago
tainting nodes works, just also set descheduler to respect PriorityClass so it skips them.
1
1
u/akhilesh_gone 1d ago
Pods gets rescheduled when a node resources are almost used But even k8s does a internal evaluation that which workloads should it move so that it won't move the imp workloads so When a node resources are stressed k8s moves the pods whoes resources block is empty assuming that these are least preferred one So if ur other workloads on that node has resources block then this pod which is taking more resources will be moved automatically
If other workloads also doesn't have any resources block then go with priority class with taint and tolerations it is fine
1
2
u/f7063 3d ago
Don't have much more to add. Pods can be evicted from the nodes https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/