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

Generate kubeconfig from output #393

Closed
yashbhutwala opened this issue Jan 2, 2020 · 4 comments · Fixed by #469
Closed

Generate kubeconfig from output #393

yashbhutwala opened this issue Jan 2, 2020 · 4 comments · Fixed by #469

Comments

@yashbhutwala
Copy link
Contributor

No description provided.

@morgante
Copy link
Contributor

morgante commented Jan 6, 2020

Can you clarify your ask here?

@yashbhutwala
Copy link
Contributor Author

Right now, afaik, there is no way to take the output of this module and turn it into a valid ~/.kube/config file. Correct me if I'm wrong :)

@morgante
Copy link
Contributor

morgante commented Jan 6, 2020

The outputs include the ca_certificate and endpoint, which should be sufficient to construct a kubeconfig file: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine#outputs

@yashbhutwala
Copy link
Contributor Author

yashbhutwala commented Jan 6, 2020

Is that enough to generate a kubeconfig file, what about client-certificate-data, client-key-data, username and password:

Similar to here: https://github.com/terraform-providers/terraform-provider-kubernetes/blob/v1.10.0/kubernetes/test-infra/gke/kubeconfig-template.yaml

google_container_cluster.primary.master_auth[0].client_certificate
google_container_cluster.primary.master_auth[0].client_key
google_container_cluster.primary.master_auth[0].username
google_container_cluster.primary.master_auth[0].password

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

Successfully merging a pull request may close this issue.

2 participants