Skip to content

Commit f678b95

Browse files
authored
Merge pull request #31726 from MrMYHuang/patch-1
Simplify commands.
2 parents 24f2fc6 + f62e303 commit f678b95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ kubectl diff -f ./my-manifest.yaml
212212

213213
# Produce a period-delimited tree of all keys returned for nodes
214214
# Helpful when locating a key within a complex nested JSON structure
215-
kubectl get nodes -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
215+
kubectl get nodes -o json | jq -c 'paths|join(".")'
216216

217217
# Produce a period-delimited tree of all keys returned for pods, etc
218-
kubectl get pods -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
218+
kubectl get pods -o json | jq -c 'paths|join(".")'
219219

220220
# Produce ENV for all pods, assuming you have a default container for the pods, default namespace and the `env` command is supported.
221221
# Helpful when running any supported command across all pods, not just `env`

0 commit comments

Comments
 (0)