Read-only archive. These discussions are from Tracston's earlier
technical forum and are kept online because the answers are still useful.
New replies are closed. Need help with something like this?
Talk to us.
Question
17 Jul 2023
Problem
Pods distributed in the cluster not evenly and user wants to deploy pods / deployments on a specific node
Solution
kubectl get nodes --show-labelskubectl label nodes <MYNODE> nodename=node2
Add Pod Affinity for you deployment
affinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: nodenameoperator: Invalues:- node2
Need this fixed properly?
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →