-
Notifications
You must be signed in to change notification settings - Fork 193
rstudio in kubernetes - runAsNonRoot context #888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The approach described in the Rocker Singularity guide, which calls Minimal example using a Pod (though StatefulSet would probably be a better choice), disregarding Ingress (or Gateway, etc.), persistent volume for /home/rstudio, and storing the password in a Secret (assuming authentication isn't handled at the Ingress layer):
Example: create the pod in the default namespace, and use port-forwarding to access:
|
@nathanweeks Is it not possible to have persistent volumes in the setup? When I try to mount /home with persistent volume, it doesnt go through. |
@radhupr Check out Zero to JupyterHub with Kubernetes + Authentication + JupyterLab R docker stack1. Reference deployment using Docker Swarm + GitHub OAuth + JupyterLab docker stacks: https://demo.jupyter.b-data.ch Footnotes
|
Using a PV for On a somewhat-related note: it's possible for users to create on-demand non-root rstudio server containers with persistent-volume-backed home directories on an OpenShift cluster (example referenced here: #747 (comment)). |
b-data's/my JupyterLab docker stack containers – like the original Jupyter docker stacks ones – run as non- |
We have RStudio running in a kubernetes cluster, along-side other jupyter-based images - in our case, it's a our own image derived from We renamed We had some fun & games getting things to route through our various proxies..... but it was mostly a case of reading docs & not trying 3 changes at once :) |
Thanks @perllaghu ! The images in https://github.com/rocker-org/ml now take this strategy as well. This is similar to the approach in rocker/binder but inherits directly from jupyter docker stack images. |
@perllaghu Could you give some information about yur setup in Kubernetes?
But I have issues while processing big chunk of data in User's R studio session. The cpu usage goes very high and the session crashes. How have you been configuring or addressing file upload and big data processing in your setup? |
@radhupr I assume you are using singleuser:
cmd: start-singleuser.sh in addition for
Regarding file upload: There is no limitation in JupyterLab or RStudio. Regarding big data processing: Kubernetes may set some resource limits.
|
I wasnt setting the cmd for singleuser. I will set it and test. Data processing : |
@radhupr are you setting memory limits? cpu use by itself rarely crashes a server, but can be correlated with RAM use. |
@radhupr Setting
Use something like singleuser:
cpu:
limit: 2
guarantee: 0.1
memory:
limit: 8G to limit to 2 cores and 8 GB RAM. Adapt limits to your needs. Default values:
This means no CPU limit and no RAM limit. And @cboettig is right: If a pod uses up all RAM, the server (host) is at risk. |
@benz0li Thanks for the response. The issue was indeed the limit setup. I had set it under wrong indentation. :| |
@radhupr Have a look at the AzureR package family or Rclone. |
@benz0li It was temporary issue I guess. I got it working now. Thanks for the references. |
@radhupr Off-topic here. Ask over at https://github.com/orgs/b-data/discussions. |
Container image name
rocker/rstudio:4.4.2
Container image digest
No response
What operating system are you seeing the problem on?
Linux
System information
Kubernetes cluster 1.30
Docker image : rocker/rstudio:4.4.2
Bug description
Hi Team,
I want to run rstudio server (free version) on kubernetes. If I'm taking wrong approach here, please guide me on how to do the setup in kubernetes.
I'm using the image rocker/rstudio:4.4.2 and trying to run it as nonRoot user. (same noted with image rocker/tidyverse:4.4.2)
The pod spec is as follows
The container is failing to start with below error
s6-overlay-preinit: fatal: unable to mkdir /var/run/s6: Permission denied
Reference to discussion forum on same issue: https://forum.posit.co/t/rstudio-server-in-kubernetes/195626/4
Can you help in addressing the issue.
How to reproduce this bug?
The text was updated successfully, but these errors were encountered: