sighupio/gatekeeper-policy-manager

How to add multiple kubeconfig files dynamically

mekalam opened this issue · 2 comments

Hi Team,

I have installed gpm and was able to add two cluster kubeconfig file in the /home/gpg/.kube/config by merging both the config files into one

Now how to added multiple kubeconfig files dynamically?

Hi @mekalam

What do you mean by "dynamically"? You would like to mount more than one kubeconfig file?

Have you tried setting the KUBECONFIG environment variable to path-to-kubeconfig1:path-to-kubeconfig-2:path-to-kubeconfig-3?

See: https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/

I haven't tested this, but it works with kubectl, so I think that it should work also with the official python client that we use.

closing as we didn't hear back from @mekalam .

feel free to reopen the issue.