Open fabricekrebs opened 4 months ago
Hey @fabricekrebs! As I understand, you're looking for the functionality to be able to specify the port for the K8s service that the clients would consume (exposed port). We will be tracking this issue internally.
I wanted to know what would be the use of specifying the service port
explicitly? Wouldn't it be easier for the user to just specify the port that they want to connect to on the K8s service (exposed port), and the NDB Operator determines the service port based on the interactions with NDB ?
Can you please let us know if there's any use case of specifying the service port that we might have missed?
Hello @manavrajvanshi,
Allowing customers to specify the exposed port provides greater flexibility in designing their Kubernetes application architecture. It is not logical for an application owner to access PostgreSQL on a port like 80, which is commonly associated with HTTP.
By default, the same port defined at the endpoint should be used. For instance, PostgreSQL should use 5432:5432 instead of 80:5432.
When an NDB operator deploys a database solution, a Kubernetes service is automatically deployed, configuring the deployed database as the endpoint.
However, it is not currently possible to specify the port on which the service will listen, and port 80 is set by default.
It should be feasible, when setting up the resources of type 'Database', to specify the port on which the Kubernetes service would listen. The Custom Resource Definition (CRD) should provide the option to define something similar:
The actual result is
We should be able to create resources like this
Then we should get similar result: