I am trying to create a cluster in the Google Kubernetes Engine that runs nginx, an RStudio server and two Shiny applications, following and adapting this guide .
I have 4 workloads, all green in the user interface, deployed via:
kubectl run nginx --image=nginx --port=80 kubectl run rstudio --image gcr.io/gcer-public/persistent-rstudio:latest --port 8787 kubectl run shiny1 --image gcr.io/gcer-public/shiny-googleauthrdemo:latest --port 3838 kubectl run shiny5 --image=flaviobarros/shiny-wordcloud --port=80
Then they were opened as node ports through:
kubectl expose deployment nginx --target-port=80 --type=NodePort kubectl expose deployment rstudio --target-port=8787 --type=NodePort kubectl expose deployment shiny1 --target-port=3838 --type=NodePort kubectl expose deployment shiny5 --target-port=80 --type=NodePort
.. are all green in the user interface.
Then I deployed this inner part of Ingress
apiVersion: extensions/v1beta1 kind: Ingress metadata: name: r-ingress spec: rules: - http: paths: - path: / backend: serviceName: nginx servicePort: 80 - path: /rstudio/ backend: serviceName: rstudio servicePort: 8787 - path: /shiny1/ backend: serviceName: shiny1 servicePort: 3838 - path: /shiny5/ backend: serviceName: shiny5 servicePort: 80
As a result, the nginx router works fine, I see the Welcome to nginx homepage, but three other paths that I get:
- / rstudio / -
Input/output error - / shiny1 / - Page not found (page Shiny 404)
- / shiny5 / - Page not found (Page Brilliant 404)
RStudio and Shiny workloads work when exposed through a single load balancer, displayed 8787 and 3838, respectively.
Can someone please indicate where I am going wrong?
Qs:
- Do I need to adapt Dockerfiles so that all of them set the status to 200 on port 80 when requesting "/"? Do I need to change the health check? I tried changing the login page to RStudio (this is 302 to / auth-sign-in if you are not logged in), but no luck
- Both RStudio and Shiny need websockets - does this affect this?
- Should there be attachment to the session? I tried to add this with IP, but with the same errors.
source share