I'm losing my mind with shiny + Kubernetes

August 23, 2019 @rucy Bruno Rucy Carneiro Alves de Lima

@rucy wrote:


I am going through a very weird situation and I feel desperate.

In short my issue is: My shiny app works perfectly locally and isolated on a docker image,
but for some odd reason it does not work properly on Google Kubernetes engine.

the exact same docker image just does not load the app properly at all.

And here is what inspect element says:

I'm not putting images of my app because I can only put one image, but as you can see from the inspect element, it doesn't load properly.

Here is my dockerfile:

FROM rocker/shiny-verse:3.6.0

RUN apt-get -y install default-jre

RUN apt-get -y install default-jdk

RUN sudo apt-get -y install libbz2-dev

RUN sudo apt-get install liblzma-dev

RUN install2.r --error \
    rJava \
    solitude \
    tidytext \
    shinythemes \
    future \
    promises \
    DT \
    plotly \
    RAdwords \
    devtools \
RUN R -e "remotes::install_github('rstudio/httpuv')"
COPY /app /srv/shiny-server
COPY shiny-server.conf /etc/shiny-server/shiny-server.conf

CMD ["/usr/bin/shiny-server.sh"]

My folder structure:

- Docker-file
- shiny-server.conf
- app
    - server.R
    - ui.R
    - www
         - logo.png

My r-ingress-nginx.yaml

apiVersion: extensions/v1beta1
kind: Ingress
     name: r-ingress-nginx
         kubernetes.io/ingress.class: nginx
         nginx.ingress.kubernetes.io/rewrite-target: /
         nginx.ingress.kubernetes.io/ssl-redirect: "false"
    - http:
          - path: /shiny1/
                serviceName: shiny1
                servicePort: 3838

I have tried to install the latest httpuv version and install Shiny 1.2.0 to no success, same thing happens.

Posts: 5

Participants: 2

Read full topic

Previous Article
Automating R scripts on the R Studio Connect Server
Automating R scripts on the R Studio Connect Server

@danielf wrote: I have a shiny app hosted on an r studio connect server. The app...

Next Article
CI/CD for Plumber APIs
CI/CD for Plumber APIs

@gvgonong wrote: Hi, I was able to do automatic deployment using Jenkins for Shi...