Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam CKA topic 1 question 2 discussion

Actual exam question from CNCF's CKA
Question #: 2
Topic #: 1
[All CKA Questions]

SIMULATION -


Task -
Set the node named ek8s-node-0 as unavailable and reschedule all the pods running on it.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Meliodas12
Highly Voted 1 year, 2 months ago
Do you really need to uncordon it? The task is only to mark the node unschedulable and reschedule all the running pods on it. It should be done by issuing: # drain node <node_name> --ignore-daemonsets
upvoted 15 times
femijohn123
8 months, 3 weeks ago
But the command will only mark the node schedulingDisabled how do we now reschedule the pods?
upvoted 1 times
importme
2 months ago
drain will safely evict all of the pods from a node, if there are daemon set-managed pods, drain will not proceed without using --ignore-daemonsets flag
upvoted 1 times
...
VivekSolutionArchitect
6 months, 3 weeks ago
The key thing here is to reschedule all POD's, if cluster has only single node and the controlplane then POD's won't get scheduled to controlplane. In this case either taints will need to be removed from controlplane or need to add tolerations to POD so that they can be scheduled on controlplane.
upvoted 2 times
Portman
6 months, 2 weeks ago
You are absolutely right. In my case, there where 3 nodes (1 master and 2 worker) so just cordon and then drain (i know drain alone can do the job, but cordon first and then drain is more complete) the worker node
upvoted 2 times
...
...
...
...
gtsvetko
Highly Voted 1 year, 1 month ago
k cordon ek8s-node-0 k drain ek8s-node-0 --delete-local-data --ignore-daemonsets --force
upvoted 10 times
Stunomatic
6 months ago
i think you are right because its asking to rescheduling all pods which are running on ek8s-node-0 so when we cordon it pods will automatically rescheduling on another node.
upvoted 2 times
...
...
Kk14
Most Recent 2 weeks, 2 days ago
Drain marks the node as unschedulable and also evict pods on the node. While, cordon, only marks the node as unschedulable. Hence, kubectl drain <node name> --ignore-daemonsets, would work in this case and also questions refers to only pods and not all objects.
upvoted 1 times
...
anhayg
3 weeks, 5 days ago
This question can be tricky with pods that are NOT created as part of replicaSets. Then the pods will be terminated only and not rescheduled on other nodes. That needs to be checked before draining the node.
upvoted 1 times
...
Natraj007
1 month, 1 week ago
# Mark the node as unschedulable kubectl cordon ek8s-node-0 # Delete all pods running on the node kubectl delete pods --all --grace-period=0 --force --field-selector spec.nodeName=ek8s-node-0
upvoted 1 times
...
Stargazer11
3 months, 2 weeks ago
No need to uncordon it. Draining the node will evict the nodes and mark it unschedulable. # k drain <node_name> --ignore-daemonsets # k get nodes # k get pods -o wide (make sure existing pods are on other nodes)
upvoted 3 times
...
botsokui
9 months, 3 weeks ago
don't need to run cordon if you're going to drain it. Drain will do it then evict all the pods in the node. I'm confused the question didn't say we have to uncordon it eventually, why some comments are saying that we need to uncordon the node?
upvoted 6 times
...
real111
9 months, 3 weeks ago
As i read this question i see that there are two actions required - make unavailable and reschedule. To make unavailable (or unschedulable) we need to cordon it and then drain, no?
upvoted 2 times
...
real111
1 year, 1 month ago
would this be correct: K get nodes K drain ek8s-node-0 –ignore-demosets Mark the node as unschedulable: kubectl cordon ek8s-node-0 Delete the node: kubectl delete node ek8s-node-0 kubectl get pods -o wide
upvoted 3 times
spocknimoy
10 months ago
I guess You Shouldnt delete node
upvoted 5 times
...
...
Hamiltonian
1 year, 5 months ago
dont forget to uncordon the node so that rescheudling can occur
upvoted 4 times
iiiaz
9 months, 1 week ago
The task does not asks to make it back available! I guess the exam checker will compare the LAST state of the node when ending the exam. If the node is uncordoned, how can the exam checker know that at some moment the node had been unscheduable. I do not see the point of uncordon it.
upvoted 3 times
...
...
kiran15789
1 year, 5 months ago
has anyone passed using this dumps.. are they another other preparation dumps?
upvoted 4 times
...
not4me
1 year, 5 months ago
It doesn’t matter, focus on how to solve it instead of node names
upvoted 1 times
...
gcpengineer
1 year, 6 months ago
isnt this should be node-0?
upvoted 7 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...