rackerlabs / spot-roadmap

Spot roadmap
Other
4 stars 0 forks source link

Terraform provider should provide Kubeconfig as an output to Cloudspace resource #13

Open sirishkr opened 3 months ago

sirishkr commented 3 months ago

See discussion here: https://www.reddit.com/r/rxt_spot/comments/1bp8cf5/billing_questions_are_we_paying_for_unusable_nodes/

Multiple users requesting it:

Also, can you provide a way to download the Kubeconfig from Terraform? The clusters are very unstable, so I had to write infrastructure as code to redeploy them when they error out. But then I have to manually fetch the kubeconfig file.

I very much want that. The kubeconfig as an output of the cloudspace resource would be great.

Also, the ability to fetch/refresh the Terraform token would be nice. When it times out and rotates, it breaks me until I manually refresh it in my automation.

TheNilesh commented 3 months ago

Kubeconfig as an output to cloud space resource will be difficult to implement because the kubeconfig does not become immediately available after cloudspace creation. It becomes available after control plane becomes ready.

The spot_kubeconfig data source with id = name of cloudspace should output the kubeconfig.

TheNilesh commented 3 months ago

https://github.com/rackerlabs/terraform-provider-spot/blob/main/docs/data-sources/kubeconfig.md#example-usage