Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation CKA Exam - Topic 1 Question 70 Discussion

Posted by Marget on Sep 19, 2024 at 01:16 PM

Score: 4%

Task

Check to see how many nodes are ready (not including nodes tainted NoSchedule ) and write the number to /opt/KUSC00402/kusc00402.txt.

Suggested Answer: A

Get Premium CKA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
32 comments · newest first
GE
Gerald 11 months ago
Tainted nodes can be tricky, not sure if this covers everything.
SA
Sabine 11 months ago
I always use `kubectl get nodes` for a quick overview.
LU
Luisa 12 months ago
This is the right way to check for ready nodes.
LA
Latrice 12 months ago
Wait, are you sure about that? I thought there were only 2.
LA
Latricia 1 year ago
Just ran the command, got 3 nodes ready!
VI
Virgilio 1 year ago
I definitely recall something about using `grep` to filter out taints, but I can't remember if we need to check for "NoSchedule" specifically or just any taint.
OL
Ollie 1 year ago
I feel like I might have mixed up the commands for counting and writing to the file. Did we use `echo` for that?
MA
Margart 1 year ago
I remember practicing a similar question where we had to filter nodes based on their status. I think using `kubectl get nodes` might be more straightforward.
ED
Edwin 1 year ago
I think we need to count the ready nodes and exclude the tainted ones, but I'm not sure if the commands are in the right order.
CA
Callie 1 year ago
Ah, I think I've got it! I'll use kubectl describe nodes to get the node info, then grep for the "ready" status and the "NoSchedule" taint, and finally use wc -l to count the number of ready nodes. Easy peasy!
NA
Nakisha 1 year ago
I'm a bit unsure about this one. I know I need to check the node readiness and exclude the tainted nodes, but I'm not sure of the exact commands to use. I'll need to review the kubectl documentation to make sure I get this right.
EA
Earleen 1 year ago
This seems pretty simple, but I want to double-check my approach. I'll start by getting the list of all nodes, then filter out the ones with the NoSchedule taint, and finally count the remaining ready nodes. Shouldn't be too hard.
RO
Rolf 1 year ago
Okay, I think I've got this. I'll use kubectl describe nodes to get the list of nodes, then grep for the "ready" status and the "NoSchedule" taint, and finally use wc -l to count the number of ready nodes. Then I'll echo the result to the file.
VA
Valentin 1 year ago
Hmm, this looks like a straightforward task, but I want to make sure I understand it correctly. I'll need to check the number of ready nodes, excluding the ones with the NoSchedule taint, and write the result to the specified file.
RY
Ryan 1 year ago
I'm pretty confident that the correct answer is B. Updating the connection strings is the key step to ensure the app can still access the database.
TO
Tony 2 years ago
I'm a bit confused about the echo part at the end. Shouldn't we just write the final count to the file instead of hard-coding the numbers?
GE
Georgiana 2 years ago
↳ replying to Tony
You can use the output of the command directly to write the final count to the file.
AM
Amira 2 years ago
↳ replying to Tony
It's better to dynamically write the final count to the file rather than hard-coding it.
MI
Miesha 2 years ago
↳ replying to Tony
Yes, you are right. We should write the final count to the file instead of hard-coding the numbers.
WI
William 2 years ago
Ha! I bet the exam writer is trying to trick us with this one. 'NoSchedule' taint? More like 'NoThanks' taint, am I right?
LY
Lyndia 2 years ago
↳ replying to William
Let's just focus on getting the right answer, no matter what they throw at us.
VA
Vashti 2 years ago
↳ replying to William
I know right, 'NoThanks' taint sounds more accurate!
EL
Elsa 2 years ago
↳ replying to William
Haha, yeah they're definitely trying to throw us off with that one.
FR
Frederic 2 years ago
Hmm, I think the second part of the solution is correct, but the first part seems a bit convoluted. Couldn't we just use 'kubectl get nodes --no-headers | wc -l' to get the total number of ready nodes?
AN
Angella 2 years ago
I believe the correct answer is to write the number 3 to the specified file.
ED
Edwin 2 years ago
The solution looks good, but I'm not sure about the need to check for nodes tainted with 'NoSchedule'. Shouldn't we just count the ready nodes regardless of their taints?
AD
Adria 2 years ago
↳ replying to Edwin
Agreed. Let's make sure to include that in our solution.
HU
Hubert 2 years ago
↳ replying to Edwin
That's a good point. We should probably check for that as well.
CL
Cletus 2 years ago
↳ replying to Edwin
But what if some nodes are tainted with 'NoSchedule'?
LO
Lorean 2 years ago
↳ replying to Edwin
I think we should just count the ready nodes.
LA
Latonia 2 years ago
Yes, we need to count the nodes ready and exclude the ones tainted NoSchedule.
AN
Angella 2 years ago
I think the question is about checking nodes ready status.
0/2000 characters

Save Cancel