flagflag  If you want to see English page, please click "English" Button at Left.
1: 2021-09-12 (日) 03:11:15 iseki ソース 現: 2021-09-12 (日) 04:40:25 iseki ソース
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


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
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
<今日>

オンライン状況

82 人のユーザが現在オンラインです。 (14 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 82

もっと...

アクセスカウンタ

今日 : 6905690569056905
昨日 : 1753317533175331753317533
総計 : 2347004823470048234700482347004823470048234700482347004823470048
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com