b4213e4872
Mount RAM-backed emptyDir at /dev/shm to remove the default 64MB limit, preventing Bus errors when using PyTorch DataLoader or NumPy multiprocessing.
JupyterLab Helm Chart
Helm chart for deploying JupyterLab instances using pure Kubernetes resources (no Operator required).
Overview
| Item | Value |
|---|---|
| Chart Version | 1.0.0 |
| App Version | 1.0 |
| Default Image | quay.io/jupyter/scipy-notebook:latest |
| Port | 8888 |
| Maintainer | paasup |
Architecture
Deployment
└── Container: jupyterlab (port 8888)
├── ConfigMap: startup-script.sh (pip upgrade 등 초기화)
├── Volume: /etc/localtime (Asia/Seoul)
├── Volume: homeVolume → /home/jovyan (optional)
├── Volume: dataVolume → /home/jovyan/data (optional)
└── groupVolumes → 임의 경로 (optional)
Service (ClusterIP, port 8888)
Ingress (Kong, HTTPS)
PVC: pvc-<release>-home (optional)
PVC: pvc-<release>-data (optional)
Prerequisites
- Kubernetes 1.21+
- Helm 3.x
- Kong Ingress Controller
- cert-manager (TLS 사용 시)
Installation
# 기본 설치
helm install my-jupyter ./manifests/helm/jupyterlab \
--namespace jupyter \
--create-namespace
# custom-values 적용
helm install my-jupyter ./manifests/helm/jupyterlab \
--namespace jupyter \
--create-namespace \
-f ./manifests/helm/jupyterlab/custom-values.yaml
# 설치 확인
helm status my-jupyter -n jupyter
kubectl get pods -n jupyter
Upgrade / Uninstall
helm upgrade my-jupyter ./manifests/helm/jupyterlab \
-n jupyter \
-f ./manifests/helm/jupyterlab/custom-values.yaml
helm uninstall my-jupyter -n jupyter
Values
| Key | Type | Default | Description |
|---|---|---|---|
image.registry |
string | quay.io |
이미지 레지스트리 |
image.repository |
string | jupyter/scipy-notebook |
이미지 리포지토리 |
image.tag |
string | latest |
이미지 태그 |
image.pullPolicy |
string | IfNotPresent |
이미지 풀 정책 |
replicas |
int | 1 |
Pod 복제본 수 (1=실행, 0=중지) |
resources.limits.cpu |
string | 2000m |
CPU 제한 |
resources.limits.memory |
string | 4096Mi |
메모리 제한 |
resources.requests.cpu |
string | 500m |
CPU 요청 |
resources.requests.memory |
string | 1024Mi |
메모리 요청 |
resources.gpu |
string | "" |
NVIDIA GPU 수 (비어 있으면 비활성화) |
jupyterConfig.token |
string | "" |
접근 토큰 (비어 있으면 인증 비활성화) |
ingress.enabled |
bool | true |
Ingress 활성화 여부 |
ingress.ingressClassName |
string | kong |
Ingress 클래스 |
ingress.hosts |
list | [{host: jupyter.example.com, paths: ["/"]}] |
호스트 설정 |
ingress.tls |
list | [{hosts: [...], secretName: ...}] |
TLS 설정 |
homeVolume.enabled |
bool | false |
홈 디렉토리 PVC 활성화 |
homeVolume.mountPath |
string | "" |
마운트 경로 (기본: /home/jovyan) |
homeVolume.size |
string | 5Gi |
PVC 크기 |
homeVolume.storageClassName |
string | "" |
StorageClass 이름 |
homeVolume.accessMode |
string | ReadWriteOnce |
접근 모드 |
dataVolume.enabled |
bool | false |
데이터 디렉토리 PVC 활성화 |
dataVolume.mountPath |
string | "" |
서브 디렉토리 이름 (기본: data) |
dataVolume.size |
string | 5Gi |
PVC 크기 |
dataVolume.storageClassName |
string | "" |
StorageClass 이름 |
dataVolume.accessMode |
string | ReadWriteOnce |
접근 모드 |
groupVolumes |
list | [] |
공유 그룹 볼륨 목록 |
imagePullSecrets |
list | [] |
Private 레지스트리 시크릿 |
Generated Resource Names
릴리즈 이름이 my-jupyter일 경우:
| 리소스 | 이름 |
|---|---|
| Deployment | my-jupyter |
| Service | my-jupyter |
| Ingress | my-jupyter |
| ConfigMap | my-jupyter-scripts |
| Home PVC | pvc-my-jupyter-home |
| Data PVC | pvc-my-jupyter-data |
Notes
- Pod는
runAsUser: 1000,fsGroup: 100으로 실행됩니다. - Container는
runAsUser: 0(root)으로 실행됩니다 (pip install 등을 위해). - 토큰 미설정 시 인증 없이 JupyterLab에 접근 가능합니다. 운영 환경에서는
jupyterConfig.token을 설정하거나 별도 인증 레이어를 구성하세요. - PVC는
helm uninstall시 삭제됩니다. 데이터 보존이 필요하면pvc.yaml의helm.sh/resource-policy: keep주석을 해제하세요. /etc/localtime은 호스트의Asia/Seoulzoneinfo를 마운트합니다.