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

Allow NodePort to be specified for services to allow connection to services such as databases #55

Open
thaoula opened this issue Sep 28, 2021 · 1 comment

Comments

@thaoula
Copy link

thaoula commented Sep 28, 2021

Hi All,

I have just started using DevSpace which seems really nice!!.

I currently migrating from Docker Compose with 10 services (Redis, MongoDB, NodeJS, Caddy etc).

I am trying to configure a MongoDB ReplicaSet Deployment using the Component Chart and our existing dockerfiles.

So far, I can get MongoDB to build and deploy fine on a K3D development cluster. The last remaining challenge is accessing the database server from outside the cluster.

From what I can tell, there appears to be no way to configure a nodePort for a service. You can set the type but cannot specify a port. It is always a random port.

If I try to add nodePort to the config, I get the following error - line 7: field nodePort not found in type latest.ServicePortConfig

So for now, I stopped using the component chart and switched to using manifests directly. Using manifests, I was able to set a nodePort on the service and can access the database from the host machine.

Is there a way to specify a nodePort?

Regards,
Tarek

@LukasGentele
Copy link
Member

LukasGentele commented Sep 28, 2021

Have you tried using port forwarding? That will allow you to access the database via localhost:port whenever devspace dev is running.

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

2 participants