kubeenv for lazy typers...
- Copy the below into your .bash_profile or similar
k8 <your-context>
, where your-context is the shortcut name you'd like to usegcloud container clusters get-credentials <clustername>
- Repeat step 3 for each of the k8s contexts you want to have available
- To use, run
k8 <your-context>
to change contexts.
k8 has tab-completion for configured contexts, use removek8 <your-envname>
to delete a context.
(see kubeenv readme for zsh usage)