openanalytics / shinyproxy-operator

Easily run ShinyProxy on a Kubernetes cluster
https://shinyproxy.io
Apache License 2.0
36 stars 9 forks source link

How to expose shinyproxy-operator to the outside? #35

Open Danoontjes opened 1 year ago

Danoontjes commented 1 year ago

Hi,

I'm new to kubernetes, so my apologies up front if this is a stupid question.

I have installed shinyproxy-operator, and that seems to be working fine. I can 'access' it from a node with curl. What I cannot figure out is how to expose it to the outside world.

I have tried to install nginx-ingress-controller in front of the skipper-ingress, but I am unable to 'connect' it to skipper. In my case I have MetalLB installed, and the nginx-ingress gets an external IP assigned. I just don't know how to forward it to skipper.

Is there some step-by-step howto somewhere that explains this final 'expose to the outside' step? I need shinyproxy-operator to be accessible by a MetalLB assigend IP.

Thanks

LEDfan commented 1 year ago

Hi

You are free to use nginx in front of skipper. In that case you have to create an ingress resource that forwards the nginx traffix to the skipper service, for example using: https://github.com/openanalytics/shinyproxy-operator/blob/master/docs/deployment/overlays/1-namespaced-hpa/skipper/ingress.yaml

You can also choose to not use nginx and directly connect MetalLB with Skipper. I don't have experience with this, but I think you should be able to follow any MetalLB tutorial which setups ingress, but then configure it to use skipper.

Danoontjes commented 1 year ago

Hi,

I have basically the same question, but now for SPO 2.0.0 I deployed a namespaced SPO, and the pods are up. I can reach them with curl from the k8s nodes, but now I need to expose them to the outside. This version seems to have an ingress controller, butI don't see any ingress pod running.

# k -n shinyproxy-spo get pods -o wide
NAME                                                              READY   STATUS    RESTARTS   AGE   IP               NODE     NOMINATED NODE   READINESS GATES
redis-node-0                                                      2/2     Running   0          19h   172.28.228.108   k8s-w1   <none>           <none>
redis-node-1                                                      2/2     Running   0          19h   172.28.197.19    k8s-w3   <none>           <none>
redis-node-2                                                      2/2     Running   0          19h   172.28.46.22     k8s-w2   <none>           <none>
shinyproxy-operator-5c66bbb9c5-5q6m7                              1/1     Running   0          19h   172.28.46.20     k8s-w2   <none>           <none>
sp-shinyproxy-rs-a09daf1e86df8ef45de25fe622c20eb8a2844a0d-jqkkg   1/1     Running   0          11m   172.28.46.23     k8s-w2   <none>           <none>
LEDfan commented 1 year ago

Hi

You'll have to deploy an ingress controller, such as ingress-nginx: https://kubernetes.github.io/ingress-nginx/ . Also see the official k8s docs: https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/