https://rancher.com/ logo
Title
b

breezy-electrician-44168

09/14/2022, 8:35 PM
is there anyway to prevent workload pods from scheduling on server (master) node? im using k3d v5.4.6. As you can tell one of the Pods is on
k3d-dev-server-0
node.
k3d cluster create dev --agents 2 --servers 1

kubectl get no
NAME               STATUS   ROLES                  AGE     VERSION
k3d-dev-agent-0    Ready    <none>                 2m13s   v1.24.4+k3s1
k3d-dev-agent-1    Ready    <none>                 2m13s   v1.24.4+k3s1
k3d-dev-server-0   Ready    control-plane,master   2m18s   v1.24.4+k3s1

kubectl create deploy web --image=nginx:alpine --replicas=3

kubectl get po -owide
NAME                   READY   STATUS    RESTARTS   AGE   IP          NODE               NOMINATED NODE   READINESS GATES
web-654c99587f-h9hr5   1/1     Running   0          27s   10.42.0.5   k3d-dev-server-0   <none>           <none>
web-654c99587f-xwkjg   1/1     Running   0          27s   10.42.1.5   k3d-dev-agent-0    <none>           <none>
web-654c99587f-4z45l   1/1     Running   0          27s   10.42.2.5   k3d-dev-agent-1    <none>           <none>
c

creamy-pencil-82913

09/14/2022, 8:38 PM
b

breezy-electrician-44168

09/14/2022, 8:40 PM
are the following labels
<http://node-role.kubernetes.io/control-plane=true,node-role.kubernetes.io/master=true|node-role.kubernetes.io/control-plane=true,node-role.kubernetes.io/master=true>
not enough to prevent by default?
w

wide-garage-9465

09/14/2022, 8:42 PM
Those are labels, not taints πŸ‘
b

breezy-electrician-44168

09/14/2022, 8:56 PM
Thanks, I added Taint and it works now. Is this just for K3d? I haven't seen the similar requirements for Managed K8s, like EKS, etc. It appears they automatically have it already.
w

wide-garage-9465

09/14/2022, 8:59 PM
K3d (like other local cluster tools, e.g. KinD, Minikube, microK8s, Docker for Desktop, Rancher Desktop) by default creates a single node which is a server/master/control-plane node. It would be pretty bad if that single node couldn't run a workload, right? In managed K8s, you usually don't even see the CP nodes and don't have access to them. Don't know how that is in EKS.
b

breezy-electrician-44168

09/14/2022, 9:01 PM
makes perfect sense, Thx!
w

wide-garage-9465

09/14/2022, 9:03 PM
πŸ‘
m

millions-alarm-86298

09/14/2022, 9:17 PM
K3d (like other local cluster tools, e.g. KinD, Minikube, microK8s, Docker for Desktop, Rancher Desktop) by default creates a single node which is a server/master/control-plane node. It would be pretty bad if that single node couldn't run a workload, right
πŸ‘ πŸ‘ πŸ‘ πŸ‘ πŸ‘