How to merge kube configs
1 min read

How to merge kube configs

Most companies have multiple dev environments and one production environment. My work uses docker and kubernetes.

I needed a way to merge all my kube config files to one for organization and plugin support.

I had a dev.kubeconfig, stg.kubeconfig, and a prod.kubeconfig.
I was able to merge the kubernetes configuration files together by using the kubectl config view command in my terminal.

KUBECONFIG=~/.kube/dev.kubeconfig:~/.kube/stg.kubeconfig:~/.prod.kubeconfig kubectl config view --flatten > ~/.kube/config
how to merge multiple kube configs into one