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

Create load balancer for service in same project as cluster #26

Closed
devurandom opened this issue Apr 24, 2021 · 2 comments
Closed

Create load balancer for service in same project as cluster #26

devurandom opened this issue Apr 24, 2021 · 2 comments

Comments

@devurandom
Copy link

devurandom commented Apr 24, 2021

I created a Kubernetes cluster using Terraform. Since the DigitalOcean Terraform provider does not yet support the urn attribute for the digitalocean_kubernetes_cluster resource, I manually moved the cluster and droplets to a different project. Afterwards I created an nginx ingress via Terraform and its Helm provider. The load balancer that the DigitalOcean cloud provider created for the type: LoadBalancer service of the nginx ingress Helm chart appeared in the default project.

It would be nice if the load balancer was created in the same project as the cluster, ideally following the cluster when it is moved through projects.

An alternative new feature would be to allow specifying the project as an annotation to the nginx ingress service (which I can set via the Helm chart -- I already do that for service.beta.kubernetes.io/do-loadbalancer-name, cf. https://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers/) This could be a new service.beta.kubernetes.io/do-loadbalancer-project-name: "my-project-name" annotation.

Another alternative would be to create the load balancer using the digitalocean_loadbalancer Terraform resource, which does support the urn attribute and can thus be moved to a specific project. Afterwards I could set the kubernetes.digitalocean.com/load-balancer-id annotation on the nginx ingress service to make it use the existing load balancer instead of creating a new one. However, this would require me to configure a forwarding_rule for this resource, which would conflict with the configuration set by the cloud provider.

@MorrisLaw
Copy link

Hey @devurandom 👋

The LB should be assigned the same project as the cluster on creation (assuming it is created through Kubernetes based mechanisms). It should also move with the cluster to the new project it gets assigned to. You will not be able to view or modify an LB via Projects (cloud webpage for your project or doctl) since it is a resource for a DOKS cluster and is expected to be interacted with through Kubernetes.

If the cluster owned LB isn't moving over and/or the LB is being created for your cluster but the LB gets assigned to the default project instead of the correct one. This is a bug. Can you please file a support ticket with this information and any screenshots you may have? Thank you very much for bringing this to our attention!

@timoreimann
Copy link

Closing this one out assuming it's been addressed. If not, then please file a support ticket as requested.

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

No branches or pull requests

3 participants