Merge pull request #2944 from rancher/dnoland1-patch-1

Improved command to get namespaces
This commit is contained in:
Catherine Luse
2021-03-19 10:26:16 -07:00
committed by GitHub
@@ -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
``` ```