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

When generate_ca_certificates = false, module does not export any kubeconfig #143

Closed
alita1991 opened this issue Nov 9, 2023 · 3 comments
Assignees
Labels
kind/question Further information is requested

Comments

@alita1991
Copy link

Hi,

When provisioning k3s with generate_ca_certificates = false, I noticed that the kubeconfig file is not available anymore. Is there a reason for not exporting it for this particular scenario?

Thanks

@xunleii xunleii self-assigned this Nov 9, 2023
@xunleii xunleii added the kind/question Further information is requested label Nov 9, 2023
@xunleii
Copy link
Owner

xunleii commented Nov 9, 2023

Hi @alita1991, unfortunately this is normal, for the same reason as your previous issue (#142); files can't easily be retrieved from a remote machine with SSH (at least without https://github.com/loafoe/terraform-provider-ssh).

Using generated certificates allows the module to create a valid Kubernetes without retrieving it.

@alita1991
Copy link
Author

Hi @xunleii, thanks for your quick response, is pretty surprising that terraform does not offer at least the basic functionality like ssh/scp, which is required in many scenarios, including the one where you need to get the logs for debugging purposes.

I guess we can close this ticket for now, and wait until we have support from terraform.

Thanks

@xunleii
Copy link
Owner

xunleii commented Nov 10, 2023

I think they made this choice because Terraform is not a "provisioning" tool like Ansible that do things directly on instances but more a tool to interface all cloud/API providers in a same and reproducible manner.

To be honest, this module is a bit "crappy" for Terraform because it uses Terraform like Ansible to install k3s with the power of TF state (and mostly because I don't like Ansible 🙄).

Also, if you already using Ansible, perhaps k3s-ansible may suit your needs better.

@xunleii xunleii closed this as completed Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants