Bird
0
0

What will be the output of kubectl get nodes --field-selector=status.conditions[?(@.type=="Ready")].status!=True?

medium📝 Command Output Q4 of 15
Kubernetes - Troubleshooting
What will be the output of kubectl get nodes --field-selector=status.conditions[?(@.type=="Ready")].status!=True?
AReturns a syntax error
BLists all nodes regardless of status
CShows nodes with Ready status True
DLists nodes that are not in Ready state
Step-by-Step Solution
Solution:
  1. Step 1: Understand field-selector filter

    The field selector filters nodes where the Ready condition status is not True, meaning nodes not ready.
  2. Step 2: Interpret output meaning

    It lists only nodes that are not ready, excluding healthy nodes.
  3. Final Answer:

    Lists nodes that are not in Ready state -> Option D
  4. Quick Check:

    Field selector filters nodes not ready = output lists those nodes [OK]
Quick Trick: Field selector filters nodes by condition status [OK]
Common Mistakes:
  • Assuming it lists all nodes
  • Thinking it shows ready nodes only
  • Believing it causes syntax error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes