Created
February 14, 2018 11:02
-
-
Save MarkTiedemann/322f6ac5ab6f25fde425b5fcd5d344d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
TEMPLATE='{range .items[*]}{.metadata.name}{";"}{end}' | |
DEPLOYMENTS=$( | |
kubectl get deployments --output="jsonpath" --template="$TEMPLATE" \ | |
| tr ";" "\n" | |
) | |
for deployment in $DEPLOYMENTS | |
do | |
echo "- $deployment" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment