flagflag  
1: 2021-09-12 (Sun) 03:11:15 iseki source Cur: 2021-09-12 (Sun) 04:40:25 iseki source
Line 1: Line 1:
 +** JupyterHub on Kubernetes (on-premises) [#zff0b408]
 +- https://zero-to-jupyterhub.readthedocs.i​o/en/latest/
 +#br
 +
 +*** helm [#wb0768ae]
 +- vi [[config.yaml>./config.yaml]]
 +#br
 +**** Repository [#p33f5bb6]
 + helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/​
 + helm repo update
 + helm repo list
 +
 +**** Install [#da21392e]
 + helm upgrade --cleanup-on-fail --install jhub jupyterhub/jupyterhub --namespace k8sns --create-namespace --version=1.1.3 --values config.yaml
 +- jhub : release name
 +- k8sns : namespace
 +
 +- helm list -n k8sns
 +#br
 +
 +**** Upgrade [#k0ed55cd]
 + helm upgrade --cleanup-on-fail jhub jupyterhub/jupyterhub --namespace k8sns --version=1.1.3 --values config.yaml
 +
 +**** config.yaml [#f0df1263]
 +- config.yaml は実行する度に使設定されるみたい.
 +- 削除する設定は明確に書く!
 +#br
 +
 +*** Volume [#eeaa0542]
 +- 以下を名前を変えて2セット作る (Hub用とnotebook用)
 +- helm で先にPODをインストールし,その後にVolumeを作って,helm でPODをアップグレードする?(namespace が決まらないので)
 +#br
 +
 +**** Install [#g66bee29]
 + helm upgrade --cleanup-on-fail  --install jhub jupyterhub/jupyterhub --namespace k8sns --create-namespace --version=1.1.3 --values config.yaml
 +
 +**** Upgrade [#p315ca56]
 + helm upgrade --cleanup-on-fail jhub jupyterhub/jupyterhub -n k8sns  --version=1.1.3 --values config.yaml^C
 +
 +**** StorageClass [#jf2ee55b]
- sc-lv.yaml - sc-lv.yaml
 apiVersion: storage.k8s.io/v1  apiVersion: storage.k8s.io/v1
Line 5: Line 45:
   annotations:    annotations:
     storageclass.kubernetes.io/is-default-cl​ass: "true"      storageclass.kubernetes.io/is-default-cl​ass: "true"
-   name: local-storage+   name: local-storage       (ここの名前を変える)
 provisioner: kubernetes.io/no-provisioner  provisioner: kubernetes.io/no-provisioner
 volumeBindingMode: WaitForFirstConsumer  volumeBindingMode: WaitForFirstConsumer
 +
 +- kubectl -n (namespace)  create -f sc-lv.yaml
 +--  kubectl  get sc
 +#br
 +
 +**** PersistentVolume [#g3fef990]
 +- pv-lv.yaml
 + apiVersion: v1
 + kind: PersistentVolume
 + metadata:
 +   name: local-pv        (ここを変える)
 + spec:
 +   capacity:
 +     storage: 1Gi
 +   # volumeMode field requires BlockVolume Alpha feature gate to be enabled.
 +   volumeMode: Filesystem
 +   accessModes:
 +   - ReadWriteOnce
 +   persistentVolumeReclaimPolicy: Retain
 +   storageClassName: local-storage        (ここを変える.対応する sc の名前にする)
 +   hostPath:
 +     path: /data/pv0001        (ここを変える)
 +     type: DirectoryOrCreate
 +   #local:
 +   #  path: /data
 +   nodeAffinity:
 +     required:
 +       nodeSelectorTerms:
 +       - matchExpressions:
 +         - key: kubernetes.io/hostname
 +           operator: In
 +           values:
 +           - comet        (ノードの名前)
 +- kubectl -n (namespace) create -f pv-lv.yaml
 +-- kubectl get pv
 +#br
 +
 +**** PersistentVolumeClaim [#w18a5036]
 +- pvc-lv.yamal
 + apiVersion: v1
 + kind: PersistentVolumeClaim
 + metadata:
 +   name: hub-db-dir      (hub用)
 +   #name: claim-iseki    (notebook用)
 + spec:
 +   storageClassName: local-storage    (対応する sc の名前にする)
 +   accessModes:
 +     - ReadWriteOnce
 +   resources:
 +     requests:
 +       storage: 1Gi
 +   volumeMode: Filesystem
 +- kubectl -n (namespace) create -f pvc-lv.yaml
 +-- kubectl get pvc
 +#br
 +**** 削除 [#q41089d9]
 +- kube -n  (namespace) delete [sc, pv, pvc]  (name)
 +- kube -n  (namespace) delete [sc, pv, pvc]  --all
 +#br


Front page   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Today

Who's Online

35 user(s) are online (1 user(s) are browsing xpwiki)

Members: 0
Guests: 35

more...

Access Counter

Today : 3749374937493749
Yesterday : 8599859985998599
Total : 2365075523650755236507552365075523650755236507552365075523650755
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com