astefanutti / kubebox

⎈❏ Terminal and Web console for Kubernetes
http://astefanutti.github.io/kubebox
MIT License
2.14k stars 142 forks source link

Kubebox base uri #122

Open lduparc opened 3 years ago

lduparc commented 3 years ago

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,

astefanutti commented 3 years ago

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.

lduparc commented 3 years ago

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 commented 3 years ago

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.

astefanutti commented 3 years ago

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