Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for configuring k8s via kubeconfig #62

Open
yunfan opened this issue Sep 8, 2019 · 3 comments
Open

Implement support for configuring k8s via kubeconfig #62

yunfan opened this issue Sep 8, 2019 · 3 comments

Comments

@yunfan
Copy link

yunfan commented Sep 8, 2019

hi, i am a newbie of k8s. and i were using kubectl recently until i saw this library

were there any method to read those config from kubectl from its configure file located at ~/.kube/config

because i am not familiar with kubectl's config format, so i dont know which of it refer to the cert file in your tutorials

@mortenlj
Copy link
Member

mortenlj commented Sep 8, 2019

Currently there is no option to read config from the config file, but we probably should have that.

For simple cases, it's fairly easy to find the fields you need. Iirc, you need the server attribute from cluster, and possibly the certificate-data. You also need the username and password, or token from user. I don't recall exactly how it looks when using client certificates.

We are lacking some documentation on how to configure the library. You can have a look at many of the other repos under fiaas for examples. Most complete example is probably fiaas/fiaas-deploy-daemon.

@yunfan yunfan closed this as completed Sep 8, 2019
@mortenlj
Copy link
Member

mortenlj commented Sep 9, 2019

Actually, I would like to keep this issue open, as a reminder that we need to look at the documentation, and possibly add some additional ways to configure the library.

@mortenlj mortenlj reopened this Sep 9, 2019
@mortenlj mortenlj changed the title how to use the config file from kubectl? Implement support for configuring k8s via kubeconfig Nov 6, 2019
@mortenlj
Copy link
Member

This would be much easier if the python-base part of the official client was available as a dependency.
I have opened an issue:
kubernetes-client/python-base#261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants