Skip to content

How to get the kubeconfig from pinniped via Python? #1037

Answered by cfryanr
junoriosity asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, the typical way would be to use pinniped get kubeconfig multiple times, once for each cluster. Each invocation can point to a different cluster by using --kubeconfig and, if needed, --kubeconfig-context, or using the KUBECONFIG env var. These invocations will generate a new kubeconfig file per cluster.

If you wanted to create a single combined kubeconfig file for all of those clusters, you could merge the individual kubeconfig files into a single file using kubectl. See https://pinniped.dev/docs/tutorials/concierge-and-supervisor-demo/ for an example of doing that (search for "merge" within that doc).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@junoriosity
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by junoriosity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants