Skip to content

Commit

Permalink
Update kubectl cheat sheet with command to identify Nodes in Ready st…
Browse files Browse the repository at this point in the history
…ate (#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 <52399571+Ritikaa96@users.noreply.github.com>

---------

Co-authored-by: Ritika <52399571+Ritikaa96@users.noreply.github.com>
  • Loading branch information
prasannagithub and Ritikaa96 committed Oct 9, 2023
1 parent fe706ba commit edd262d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/en/docs/reference/kubectl/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ kubectl get pods --show-labels
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
&& kubectl get nodes -o jsonpath="$JSONPATH" | grep "Ready=True"

# Check which nodes are ready with custom-columns
kubectl get node -o custom-columns='NODE_NAME:.metadata.name,STATUS:.status.conditions[?(@.type=="Ready")].status'

# Output decoded secrets without external tools
kubectl get secret my-secret -o go-template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'

Expand Down

0 comments on commit edd262d

Please sign in to comment.