Update cheatsheet.md
Adding a common command I use to ensure common or namespace wide ENV variables are properly set, i.e. by a ConfigMap
This commit is contained in:
@@ -216,6 +216,10 @@ kubectl get nodes -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
|
|||||||
|
|
||||||
# Produce a period-delimited tree of all keys returned for pods, etc
|
# Produce a period-delimited tree of all keys returned for pods, etc
|
||||||
kubectl get pods -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
|
kubectl get pods -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
|
||||||
|
|
||||||
|
# Produce ENV for all pods
|
||||||
|
# Make sure to set your default namespace or this will run on system pods
|
||||||
|
for pod in $(kubectl get po --output=jsonpath={.items..metadata.name}); do echo $pod && kubectl exec -it $pod env; done
|
||||||
```
|
```
|
||||||
|
|
||||||
## Updating resources
|
## Updating resources
|
||||||
|
|||||||
Reference in New Issue
Block a user