kubebox icon indicating copy to clipboard operation
kubebox copied to clipboard

Kubebox base uri

Open lduparc opened this issue 3 years ago • 4 comments

Hi,

How to define a base uri for kubebox when deploying under Kubernetes ?

Eg: https://mydomain.something.com/kubebox

When all is at / it's working but not with /kubebox.

Thanks,

lduparc avatar Apr 26 '21 11:04 lduparc

That may depend on the Ingress controller that's configured on your cluster, and if it support target rewriting for path based routing. For example with the NGINX Ingress controller, the nginx.ingress.kubernetes.io/rewrite-target can be used, see https://kubernetes.io/docs/concepts/services-networking/ingress/.

Otherwise, it may be needed to add a way to specify the root location of the Kubebox reverse proxy, as discussed in https://serverfault.com/questions/562756/how-to-remove-the-path-with-an-nginx-proxy-pass.

astefanutti avatar Apr 26 '21 12:04 astefanutti

Hi,

Using Istio I try to set a VirtualService with prefix: /kubebox and rewrite uri to / but kubebox UI is available without info (login dialog appear instead of automatically login to k8s api)

lduparc avatar Apr 26 '21 14:04 lduparc

In fact problemn is related to server part, kubebox.js,

Rewrite is working but then it try to call /server, /master/api and /master/ on kubebox.js.

We need to be able to define a base_path for server.

lduparc avatar Apr 26 '21 16:04 lduparc

Thanks for the feedback. Right, that'd be useful to be able to set the base location the reverse proxy is serving from.

astefanutti avatar Apr 26 '21 16:04 astefanutti