Shiny Kubernetes

Shiny Server makes it easy to build interactive web apps straight from R. You can host standalone apps on a webpage or embed them in R Markdown documents or build dashboards. You can also extend your Shiny apps with CSS themes, htmlwidgets, and JavaScript actions.

This is a pre-configured image with R and the open source edition of Shiny Server. The particular setup for this software uses the Shiny image from the Rocker project (Docker for R users).

Software Included

Package Version License
R 4.1.0 GPL-3
Shiny 1.5.17.973 GPL-3
Rocker Shinyverse 4.1.0 GPL-2

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to install a Kubernetes 1-Click Application. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating Shiny Kubernetes using the control panel, you can also use the DigitalOcean API. As an example, to create a 3 node DigitalOcean Kubernetes cluster made up of Basic Droplets in the SFO2 region, you can use the following doctl command. You need to authenticate with doctl with your API access token) and replace the $CLUSTER_NAME variable with the chosen name for your cluster in the command below.

doctl kubernetes clusters create --size s-4vcpu-8gb $CLUSTER_NAME --1-clicks shiny

Getting Started After Deploying Shiny Kubernetes

Once you deploy this 1-click Kubernetes listing, verify that RStudio Server is running with kubectl get pods -A. You should see a line similar to shiny shiny-12345-67890 1/1 Running 0 99s.

Forward port 3838 with kubectl -n shiny port-forward deploy/shiny 3838.

Visit localhost:3838 and you are ready to use Shiny Kubernetes!

Note: It is recommended a minimum of 2 nodes is required to prevent downtime during upgrades or maintenance.