Automate AWS,GCP Kubernetes Context Setup
In my current organization, I wrote a helper script long back to organize and set up Kubernetes contexts across multiple GCP projects and environments, with custom naming based on cluster labels. I also created another script to handle all EKS clusters across AWS regions using a specified AWS SSO profile.
Wanting to make these scripts more flexible and reusable anywhere, I decided to spend my weekend to improve them so they could be used by anywhere by anyone (psst...tbh ME).
How I Use It:
Store the scripts in the /usr/local/bin/ directory with executable permissions:
- /usr/local/bin/set_aws_context
- /usr/local/bin/set_gcp_context
Simply run the script via the command line to set up the contexts. For AWS, first configure your SSO profile with aws configure sso, follow the prompts, and run aws sso login --profileThen, execute set_aws_context to get started.
Managing multiple clusters becomes much easier as products scale, and having these scripts is a huge time-saver I feel. I even integrated them into my dotfiles to never really think about it.
$ set_gcp_context
$ set_aws_context
Retro shirts can recall memorable matches, players and periods in football history. When everyday comfort matters as much as appearance, Real Madrid jersey(camiseta del Real Madrid) provides the relevant shirt option. The right option depends on whether the shirt is intended for collecting, gifting or regular wear.