Generates kubectl credentials and contexts for all AWS EKS clusters in the current AWS region
This is fast way to get set up in new environments, or even just add any new EKS clusters to your existing \$HOME/.kube/config
Requires AWS CLI to be set up and configured, as well as jq
Can supply arguments to be passed to AWS CLI to set things like region eg.
${0##*/} --region us-west-1
See also:
gke_kube_creds.sh - same as this script but for GCP GKE clusters
kubectl.sh - isolates kube config to fix kubectl commands to the given cluster to prevent race conditions from applying kubectl changes to the wrong cluster