helm
- vi config.yaml
Repository
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/ helm repo update helm repo list
Install
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
Upgrade
helm upgrade --cleanup-on-fail jhub jupyterhub/jupyterhub --namespace k8sns --version=1.1.3 --values config.yaml
Volume
- 以下を名前を変えて2セット作る (Hub用とnotebook用)
- helm で先にPODをインストールし,その後にVolumeを作って,helm でPODをアップグレードする?(namespace が決まらないので)
Install
helm upgrade --cleanup-on-fail --install jhub jupyterhub/jupyterhub --namespace k8sns --create-namespace --version=1.1.3 --values config.yaml
Upgrade
helm upgrade --cleanup-on-fail jhub jupyterhub/jupyterhub -n k8sns --version=1.1.3 --values config.yaml^C
StorageClass
- sc-lv.yaml
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: annotations: storageclass.kubernetes.io/is-default-class: "true" name: local-storage (ここの名前を変える) provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer
- kubectl -n (namespace) create -f sc-lv.yaml
- kubectl get sc
- kubectl get sc
PersistentVolume
- 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
- kubectl get pv
PersistentVolumeClaim
- 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
- kubectl get pvc
Counter: 364,
today: 1,
yesterday: 1
最終更新: 2021-09-12 (日) 04:40:25 (JST) (954d) by iseki