-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Unable to connect GCP GKE cluster using client-go with GCP service account key #668
Comments
@cjcullen can you provide me some idea of how to achieve the same |
client-go If you want to authorize differently you should:
|
@ahmetb as I understand you suggest something like: restClient, _ := rest.RESTClientFor(restConfig)
restClient.Client = oauth2HTTPClient
clientSet := kubernetes.New(restClient) the problem with this approach is that you have one config for all api groups, unlike when you use |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I want to connect GCP GKE cluster without setting GOOGLE_APPLICATION_CREDENTIALS, gcloud and kubeconfig.
When I use the basic authentication using username and password, I am able to connect. But when I am using GCP IAMservice account key, it always reporting error: cannot construct google default token source: google: could not find default credentials.
I am creating the GKE cluster on a fly using GKE APIs but GKE do not have support on cluster level and that's why I am using client-go sdk. But all the docs, github posts and blogs are saying to set ADC credentials. But without setting that and even without gcloud and kubectl how can I create kubernetes client with GCP IAM service account credential.
The text was updated successfully, but these errors were encountered: