export KUBECONFIG=~/.kube/config:/path/to/new/config kubectl config view --flatten > /tmp/config #copy this file (/tmp/config) to ~/.kube/config or export it to use mv /tmp/config ~/.kube/config