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
Terraform connecting to controller in k8s cluster #135
Comments
AFAIK the juju connection only requires the API endpoint of the controller (here). The proxy-config is not required. At this moment, this provider does not bootstrap controllers and this param is not required. I will close this issue. Please reopen if you have more comments. |
Actually, won't juju use the proxy? it does create a proxy tunnel... |
16:05:37 INFO juju.cmd supercommand.go:56 running juju [2.9.38 6d211be0d72d6f4d625c61c7c4ddb4e9325226c8 gc go1.18.9] Model Cloud/Region Type Status Units Access Last connection 16:05:37 DEBUG juju.api monitor.go:35 RPC connection died |
Hi, Building on what @alesstimec said, I believe there is another type of connector that is used when connecting in more complex scenarios in Juju, for example when connecting to a controller residing within a k8s cluster. The connector is here in Juju. I ran into this issue when trying to use Terraform to connect to a controller that is within Kubernetes, the error was as below. In this scenario the controller is running and can be access with regular juju commands but not via Terraform.
I hope that makes sense. |
I reopen this to start some additional research on how to proceed. |
@juanmanuel-tirado Just a note that we ended up needing this again and came up with a workaround using For anyone else encountering this issue, you can use the following command + tweak to enable the Terraform provider to talk to a controller in k8s.
Thanks to @kelkawi-a for testing this. |
Thanks @kian99 for the workaround!! |
I just published a post about this on discourse. I'll close this particular issue, but feel free to comment/reply either here or on the discourse post to further the discussion 👍 |
Hi,
The Terraform provider currently accepts a controller address, username, password and CA cert.
In the case of a controller within a kubernetes cluster, the Juju config file controllers.yaml also contains a "proxy-config" section with more details particularly for getting access into the cluster and talking to the controller. Without this extra config I imagine it is impossible to talk to a controller within a k8s cluster.
I'd just like to confirm the above is correct and if so make a feature request for the provider to be able to make use of the extra "proxy-config" information.
The text was updated successfully, but these errors were encountered: