kubectx is a utility to manage and switch between kubectl(1) contexts. Thanks for this Ahmet Alp Balkan.
How to install on OSX
You can to install with manual or package manager. If you want to install with brew or macports, follow the command:
sudo port install kubectx
How to merge clusters
If there are more clusters in config file, you can combine these files with the
kubectl config view command.
For example, i have two kubeconfig file. These are stagging.yml and prod.yml. I merged with this command.
KUBECONFIG=stagging.yml:prod.yml kubectl config view --merge --flatten > ~/.kube/config
and don’t forget permissions
chmod go-r ~/.kube/config
Lets get to know Kubectx
and rename context name
I hope it was useful.