mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-26 13:08:11 +00:00
Merge pull request #2944 from rancher/dnoland1-patch-1
Improved command to get namespaces
This commit is contained in:
@@ -89,7 +89,7 @@ Create a bash script file called `account_update.sh`. Be sure to `chmod +x accou
|
|||||||
```
|
```
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
for namespace in $(kubectl get namespaces -A -o json | jq -r '.items[].metadata.name'); do
|
for namespace in $(kubectl get namespaces -o custom-columns=NAME:.metadata.name --no-headers); do
|
||||||
kubectl patch serviceaccount default -n ${namespace} -p "$(cat account_update.yaml)"
|
kubectl patch serviceaccount default -n ${namespace} -p "$(cat account_update.yaml)"
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user