Skip to content

Commit edd262d

Browse files
Update kubectl cheat sheet with command to identify Nodes in Ready state (#43114)
* Update cheatsheet.md Added - Check which nodes are ready with custom-columns * Update content/en/docs/reference/kubectl/cheatsheet.md Co-authored-by: Ritika <[email protected]> --------- Co-authored-by: Ritika <[email protected]>
1 parent fe706ba commit edd262d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ kubectl get pods --show-labels
224224
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
225225
&& kubectl get nodes -o jsonpath="$JSONPATH" | grep "Ready=True"
226226

227+
# Check which nodes are ready with custom-columns
228+
kubectl get node -o custom-columns='NODE_NAME:.metadata.name,STATUS:.status.conditions[?(@.type=="Ready")].status'
229+
227230
# Output decoded secrets without external tools
228231
kubectl get secret my-secret -o go-template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'
229232

0 commit comments

Comments
 (0)