Skip to content

Commit 7a8fef9

Browse files
authored
update pod mapping to avoid deprecation notice
1 parent 6119f08 commit 7a8fef9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ kubectl get pods -o json | jq -c 'path(..)|[.[]|tostring]|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`
222-
for pod in $(kubectl get po --output=jsonpath={.items..metadata.name}); do echo $pod && kubectl exec -it $pod env; done
222+
for pod in $(kubectl get po --output=jsonpath={.items..metadata.name}); do echo $pod && kubectl exec -it $pod -- env; done
223223
```
224224

225225
## Updating resources

0 commit comments

Comments
 (0)