You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running a cluster of 3 CrateDB nodes on Kubernetes.
I have set up an ingress to access the admin UI on path /db. However, I think to access it on this path I probably need to do some configuration so static files are served from the /db path, or the requests are routed on this path. How to do this configuration?
In general, the Admin UI itself can be hosted on any path. However, it has to know about the CrateDB HTTP API endpoint, usually available at /_sql.
I have set up an ingress to access the admin UI on path /db.
I see. So, the HTTP API endpoint of CrateDB itself would also be available at /db/_sql?
At [1], I've referenced the utility function which computes the base URI used to access the database HTTP API. We will have to check if that would need corresponding adjustments.
I've added an example at 1, which outlines how to configure Nginx to reverse-proxy the CrateDB HTTP API endpoint to the /db subdirectory. The nginx.conf is at 2. Maybe you can use it as an inspiration to configure the K8s Ingress component appropriately.
I am also exploring similar details with vanilla Nginx, where I selected the /c URL path to serve CrateDB from. If there is anything you feel unanswered about, please let us know. On the other hand, we are interested if you have been able to make progress with a corresponding Ingress configuration. 🙏
Activity
amotl commentedon Sep 14, 2022
Dear Arjun,
thank you for writing in.
In general, the Admin UI itself can be hosted on any path. However, it has to know about the CrateDB HTTP API endpoint, usually available at
/_sql.I see. So, the HTTP API endpoint of CrateDB itself would also be available at
/db/_sql?At [1], I've referenced the utility function which computes the base URI used to access the database HTTP API. We will have to check if that would need corresponding adjustments.
With kind regards,
Andreas.
[1]
crate-admin/app/scripts/services/sql.js
Lines 20 to 40 in 83e2a3a
amotl commentedon Sep 14, 2022
Hi again,
I've added an example at 1, which outlines how to configure Nginx to reverse-proxy the CrateDB HTTP API endpoint to the
/dbsubdirectory. Thenginx.confis at 2. Maybe you can use it as an inspiration to configure the K8s Ingress component appropriately.With kind regards,
Andreas.
Footnotes
https://github.com/crate/cratedb-examples/tree/main/spikes/http-api-behind-nginx ↩
https://github.com/crate/cratedb-examples/blob/main/spikes/http-api-behind-nginx/nginx.conf ↩
amotl commentedon Sep 29, 2022
Dear Arjun,
are the resources referenced above helpful to you?
With kind regards,
Andreas.
amotl commentedon Apr 3, 2026
Hi again. @Kleinjohann contributed an improvement in this area just recently, in this case to the Python driver.
I am also exploring similar details with vanilla Nginx, where I selected the
/cURL path to serve CrateDB from. If there is anything you feel unanswered about, please let us know. On the other hand, we are interested if you have been able to make progress with a corresponding Ingress configuration. 🙏/cc @goat-ssh, @WalBeh