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

Actual exam question for Linux Foundation's CKA exam
Question #: 70
Topic #: 1
[All CKA Questions]

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.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Gerald
4 months ago
Tainted nodes can be tricky, not sure if this covers everything.
upvoted 0 times
...
Sabine
4 months ago
I always use `kubectl get nodes` for a quick overview.
upvoted 0 times
...
Luisa
4 months ago
This is the right way to check for ready nodes.
upvoted 0 times
...
Latrice
4 months ago
Wait, are you sure about that? I thought there were only 2.
upvoted 0 times
...
Latricia
5 months ago
Just ran the command, got 3 nodes ready!
upvoted 0 times
...
Virgilio
5 months 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.
upvoted 0 times
...
Ollie
5 months ago
I feel like I might have mixed up the commands for counting and writing to the file. Did we use `echo` for that?
upvoted 0 times
...
Margart
5 months 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.
upvoted 0 times
...
Edwin
5 months 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.
upvoted 0 times
...
Callie
5 months 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!
upvoted 0 times
...
Nakisha
5 months 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.
upvoted 0 times
...
Earleen
5 months 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.
upvoted 0 times
...
Rolf
5 months 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.
upvoted 0 times
...
Valentin
6 months 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.
upvoted 0 times
...
Ryan
6 months 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.
upvoted 0 times
...
Tony
1 year 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?
upvoted 0 times
Georgiana
1 year ago
You can use the output of the command directly to write the final count to the file.
upvoted 0 times
...
Amira
1 year ago
It's better to dynamically write the final count to the file rather than hard-coding it.
upvoted 0 times
...
Miesha
1 year ago
Yes, you are right. We should write the final count to the file instead of hard-coding the numbers.
upvoted 0 times
...
...
William
1 year ago
Ha! I bet the exam writer is trying to trick us with this one. 'NoSchedule' taint? More like 'NoThanks' taint, am I right?
upvoted 0 times
Lyndia
1 year ago
Let's just focus on getting the right answer, no matter what they throw at us.
upvoted 0 times
...
Vashti
1 year ago
I know right, 'NoThanks' taint sounds more accurate!
upvoted 0 times
...
Elsa
1 year ago
Haha, yeah they're definitely trying to throw us off with that one.
upvoted 0 times
...
...
Frederic
1 year 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?
upvoted 0 times
...
Angella
1 year ago
I believe the correct answer is to write the number 3 to the specified file.
upvoted 0 times
...
Edwin
1 year 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?
upvoted 0 times
Adria
1 year ago
Agreed. Let's make sure to include that in our solution.
upvoted 0 times
...
Hubert
1 year ago
That's a good point. We should probably check for that as well.
upvoted 0 times
...
Cletus
1 year ago
But what if some nodes are tainted with 'NoSchedule'?
upvoted 0 times
...
Lorean
1 year ago
I think we should just count the ready nodes.
upvoted 0 times
...
...
Latonia
2 years ago
Yes, we need to count the nodes ready and exclude the ones tainted NoSchedule.
upvoted 0 times
...
Angella
2 years ago
I think the question is about checking nodes ready status.
upvoted 0 times
...

Save Cancel