We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6119f08 commit 7a8fef9Copy full SHA for 7a8fef9
content/en/docs/reference/kubectl/cheatsheet.md
@@ -219,7 +219,7 @@ kubectl get pods -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
219
220
# Produce ENV for all pods, assuming you have a default container for the pods, default namespace and the `env` command is supported.
221
# 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
+for pod in $(kubectl get po --output=jsonpath={.items..metadata.name}); do echo $pod && kubectl exec -it $pod -- env; done
223
```
224
225
## Updating resources
0 commit comments