Add jupyter notebook
This commit is contained in:
parent
2dfa37ec5f
commit
c14e2adb27
9 changed files with 113 additions and 0 deletions
46
jupyter/base/jupyter-deployment.yaml
Normal file
46
jupyter/base/jupyter-deployment.yaml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: jupyter-notebook
|
||||||
|
namespace: jupyter
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: jupyter-notebook
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: jupyter-notebook
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: jupyter-notebook
|
||||||
|
image: quay.io/jupyter/datascience-notebook:python-3.12.8
|
||||||
|
env:
|
||||||
|
- name: MINIO_ACCESS_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: minio-credentials
|
||||||
|
key: MINIO_ACCESS_KEY
|
||||||
|
- name: MINIO_SECRET_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: minio-credentials
|
||||||
|
key: MINIO_SECRET_KEY
|
||||||
|
- name: MINIO_ENDPOINT_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: minio-credentials
|
||||||
|
key: MINIO_ENDPOINT_URL
|
||||||
|
ports:
|
||||||
|
- containerPort: 8888
|
||||||
|
# env:
|
||||||
|
# - name: JUPYTER_TOKEN
|
||||||
|
# value: "your-secure-token"
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /home/jovyan/work
|
||||||
|
name: notebook-data
|
||||||
|
volumes:
|
||||||
|
- name: notebook-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: jupyter-notebook-pvc
|
12
jupyter/base/jupyter-persistent-volume.yaml
Normal file
12
jupyter/base/jupyter-persistent-volume.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: jupyter-notebook-pvc
|
||||||
|
namespace: jupyter
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 50Gi
|
||||||
|
storageClassName: csi-sc-cinderplugin
|
11
jupyter/base/jupyter-service.yaml
Normal file
11
jupyter/base/jupyter-service.yaml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: jupyter-notebook-service
|
||||||
|
namespace: jupyter
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 8888
|
||||||
|
targetPort: 8888
|
||||||
|
selector:
|
||||||
|
app: jupyter-notebook
|
6
jupyter/base/kustomization.yaml
Normal file
6
jupyter/base/kustomization.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- jupyter-persistent-volume.yaml
|
||||||
|
- jupyter-deployment.yaml
|
||||||
|
- jupyter-service.yaml
|
0
jupyter/jupyter-application.yaml
Normal file
0
jupyter/jupyter-application.yaml
Normal file
7
jupyter/overlays/dev/kustomization.yaml
Normal file
7
jupyter/overlays/dev/kustomization.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: kafka
|
||||||
|
commonLabels:
|
||||||
|
env: dev
|
||||||
|
resources:
|
||||||
|
- ../../base/
|
7
jupyter/overlays/prod/kustomization.yaml
Normal file
7
jupyter/overlays/prod/kustomization.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: kafka
|
||||||
|
commonLabels:
|
||||||
|
env: prod
|
||||||
|
resources:
|
||||||
|
- ../../base/
|
7
jupyter/overlays/test/kustomization.yaml
Normal file
7
jupyter/overlays/test/kustomization.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: kafka
|
||||||
|
commonLabels:
|
||||||
|
env: test
|
||||||
|
resources:
|
||||||
|
- ../../base/
|
17
jupyter/readme.md
Normal file
17
jupyter/readme.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
kubectl create ns jupyter
|
||||||
|
kubectl -n jupyter apply -f jupyter-persistent-volume.yaml
|
||||||
|
kubectl -n jupyter apply -f jupyter-deployment.yaml
|
||||||
|
kubectl -n jupyter apply -f jupyter-service.yaml
|
||||||
|
kubectl -n jupyter apply -f s3-secrets-trino.yaml
|
||||||
|
|
||||||
|
kubectl get pvc -n jupyter
|
||||||
|
kubectl get pvc -n jupyter
|
||||||
|
|
||||||
|
kubectl -n jupyter port-forward svc/jupyter-notebook-service 8888:8888
|
||||||
|
|
||||||
|
kubectl -n jupyter logs jupyter-notebook-676fb4f85b-sb2h8
|
||||||
|
kubectl -n jupyter describe jupyter-notebook-676fb4f85b-sb2h8
|
||||||
|
|
||||||
|
kubectl get no -o=wide
|
||||||
|
|
||||||
|
!pip install
|
Loading…
Add table
Reference in a new issue