Last active
May 21, 2020 13:32
-
-
Save gswallow/4f79f9a841cfd689b258a938351ec4c0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Amazon EKS | |
aws eks update-kubeconfig --name whatever-its-called \ | |
--dry-run --alias my-cluster > $HOME/.kube/config.d/my-cluster | |
rehash | |
# Azure Kubernetes Service | |
az aks get-credentials --name whatever-its-called \ | |
--resource-group my-resource-group --context my-aks-cluster \ | |
> $HOME/.kube/config.d/my-aks-cluster | |
rehash | |
# Google GKE cli just barfs whatever it wants into $KUBECONFIG | |
KUBECONFIG=$HOME/.kube/config.d/my-gke-cluster \ | |
gcloud container clusters get-credentials \ | |
--region us-central1 whatever-its-called | |
yq w -i $HOME/.kube/config.d/my-gke-cluster 'contexts[0].name' my-gke-cluster | |
rehash | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment