This is a fantastic question, and I am excited to see how others weigh in! Typically where we advise customers to start is with docker and containerizing the products themselves.
We have guidance on running RStudio Connect in a docker container in our documentation here: https://docs.rstudio.com/connect/admin/server-management.html#server-docker
Further, we have documentation on using RStudio Server Pro with the Kubernetes Job Launcher here: https://docs.rstudio.com/rsp/integration/launcher-kubernetes/
Finally, we have example docker containers with the three products here: https://hub.docker.com/u/rstudio
(Backed by this repository) https://github.com/rstudio/rstudio-docker-products
While we do not publish example kubernetes resources that you can use to automatically deploy these assets, most of these questions will come down to how you manage infrastructure in Kubernetes. Generally, we only recommend taking on this approach if you are familiar with running infrastructure in Kubernetes. Otherwise, the complexities of running and maintaining Kubernetes makes it harder to be successful with our professional products.If you are comfortable with deploying infrastructure to Kubernetes, there are a few thoughts I would keep in mind:
- Each product needs a privileged container (we discuss this on the rstudio-docker-products repository)
- You would probably lean towards a service for each product
- Containers for RStudio Connect should be expected to be long-lived and persistent - each container will house many pieces of content and likely many users.
- Persistent storage is very important here, especially in a HA cluster. While RStudio Package Manager can use persistent storage on AWS S3, for instance, the other products require NFS. AWS EFS has shown itself to have performance/speed problems with application-based workloads and is not generally recommended for this type of infrastructure. Your mileage may vary.
- Similarly, RStudio Package Manager and RStudio Connect require a database - we would recommend using a persistent database outside of Kubernetes.
Much of how this is done will depend on your own practices for managing and maintaining infrastructure inside of Kubernetes.