Last active
July 24, 2021 10:46
-
-
Save unacceptable/8a2916e0cbd1da540b5dedffa8d994a3 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
while read -r AWS_PROFILE; do | |
for CLUSTER in $(aws eks list-clusters --profile "$AWS_PROFILE" --query clusters --output text); do | |
aws eks update-kubeconfig --name "$CLUSTER" --profile "$AWS_PROFILE" | |
done | |
done < <( | |
grep "^\[.*\]$" ~/.aws/credentials | sed 's/\[//;s/\]//;s/profile //' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment