-
Notifications
You must be signed in to change notification settings - Fork 2k
Adding support for GKE in KubeConfig #119
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
Comments
I can see how this is out of scope for the client and should perhaps be handled by some plugin for each different type of auth or cloud provider. On the other hand, opening up to another type of authentication and configuration besides reading |
Some configurations in kubeconfig require the client to run a refresh command. GCP provider is one (and the only one I know) of them. I think it is resonable to support use case of refreshing token if it is already in kubeconfig file, but retrieving configuration from different client providers is out of the scope of client libraries and should be a separate library/command. to @bergman I think it is useful to generalize the configuration object (if it is not already) to be able to support other auth providers. |
@bergman just for completeness, there are a wide variety of ways to load configs other than The easiest is to set the But there are other programatic approaches also, for example: Hope that helps. |
I'm going to close this, since it's out of scope for the library. |
@brendandburns all of those options require a file (could be virtual I guess and made programmatically within your code, but still) in the format of Even if you do open up to some plugins for doing auth and configuration for different providers, they will need some API to do so and generating a virtual file to do that is not great. Agree on closing this issue as it relates only to GKE. Please point me to where we can have the more general discussion on making it simpler to use with any provider. |
@bergman I think I must not understand, you can instantiate a KubeConfig kc = new KubeConfig(...);
... Is this because there aren't setters for the I can see an argument for both of those features. If you want one (or both) please open separate issues like "make KubeConfig sub-objects strongly typed" or somesuch... Thanks! |
@bergman friendly ping for more info if you want... thanks! |
@brendandburns thanks for getting back to me! I'm on holidays so sorry for the delayed response. You're right, it's possible to instantiate a Something that would allow me to do something like this is what I'm after: |
Closing in favor of #168 that better captures the intent of this issue. |
It is possible to connect to a remote kubernetes cluster hosted by google (GKE) with the following command, which automatically updates the .kube/config file:
It would be nice if this kind of configuration was supported by the java client out of the box.
The text was updated successfully, but these errors were encountered: