Skip to content

Instantly share code, notes, and snippets.

@mimizone
Created June 1, 2023 21:05
Show Gist options
  • Save mimizone/fc278929752c98ab9d7b00e8c3565fbf to your computer and use it in GitHub Desktop.
Save mimizone/fc278929752c98ab9d7b00e8c3565fbf to your computer and use it in GitHub Desktop.
Merge Kubeconfig
cp ~/.kube/config ~/.kube/config-backup
export KUBECONFIG=~/.kube/config:/path/cluster1:/path/cluster2
kubectl config view --flatten > all-in-one-kubeconfig.yaml
mv all-in-one-kubeconfig.yaml ~/.kube/config
kubectl config get-clusters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment