Answers for "Merging multiple kube config files in to one"

0

Merging multiple kube config files in to one

# If you already have multiple config files to connect to different clusters, you would like to merge them first. You can merge both the config file using syntax below

# Merge ~/.kube/config and ~/.kube/devClusterConfig in to new config /tmp/config
$ KUBECONFIG=~/.kube/config:~/.kube/devClusterConfig kubectl config view --flatten > /tmp/config

# Replace old config with new merged config
$ mv /tmp/config ~/.kube/config


#Switching the Kubernetes clusters using kubectl commands
$ kubectl config get-contexts

$ kubectl config use-context qa-aks-cluster
Posted by: Guest on April-13-2022

Code answers related to "Merging multiple kube config files in to one"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language