Can somebody please help me understand why number 4 on the lab Node Affinity giv . . .

dane_murphy:
Can somebody please help me understand why number 4 on the lab Node Affinity gives me different results than the solution video. The question asks me to state which nodes which nodes can accept the pods of this deployment. In the lab, the correct answer is “master/controlplane and node01”, however when I use the command line to see where pods are being sent, they all say node01. In addition to that, the status of these pods is forever in a “ContainerCreating” status. There is also a taint on node01 as shown in the screenshot, is this preventing containers from being created? My understanding of taints is that pods cannot be sent to nodes with taints unless tolerance is specified, and since tolerance was not specified on this problem I do not understand why pods are being sent to node01 at all. I would appreciate any clarification on this one.

Vijin Palazhi:
Hi Dane, looks like in this case the node01 is not ready? Judging by the taint?

As for the answer - in this case both the nodes should be able to schedule workloads if there are no taints on them (node01 should not ahve a taint - I suspect the node is not ready in this case after the pods were created).

In a working environment, as the number of pods scale up both controlplane and node01 should be able to schedule the pods.

I will check whats wrong with this particular lab in a bit.

Vijin Palazhi:
This should be the default status of this particular cluster. No taint on node01

dane_murphy:
Hi Vijin, I appreciate the quick response. You mentioned that node01 should not have a taint, but in the terminal in my screenshot it says that it does have one “http://node.kubernetes.io/unreachable:NoSchedule|node.kubernetes.io/unreachable:NoSchedule”. I see in your screenshot you do not have the same taint as I do. I’m not sure why we would be getting different results.

Vijin Palazhi:
is your session still open - ? if so can you check the status of the nodes?

Vijin Palazhi:
i am assuming its closed?

dane_murphy:
Yes it’s closed, but it won’t take me long to start it back up. Give me couple minutes

Vijin Palazhi:
sure

dane_murphy:
Okay so if I look at the taints before creating the deployment and scaling it, there are no taints on node01. However, after creating the deployment “blue” and scaling it to 6, a taint appears on node01

Vijin Palazhi:
hmm… i see… what is the status of the node right now?

Vijin Palazhi:
node01

dane_murphy:

Vijin Palazhi:
yeah I see it… its an issue with the node01

Vijin Palazhi:
i will get this fixed. Sorry about that

dane_murphy:
No worries at all. Thank you for having a look. I can try this lab again at a future time.

Vijin Palazhi:
Hi @dane_murphy So I believe this should be fixed now. For the question 5, the pods when scaled up should run on both nodes (perhaps not with just 6 replicas), which is why we need to inspect the taints to figure out if controlplane can also run workloads.

When scaled - it will eventually run on both nodes:

dane_murphy:
Hi @Vijin Palazhi, thank you for checking in. I was able to get through the question without issues.