提交 c171c9b1 创建 作者: 宋海霞's avatar 宋海霞

更新 minikube中安裝jupyterhub.txt

上级 1030cd4d
1. 将以下四个镜像使用docker pull命令拉取到本地 1. 将以下四个镜像使用docker pull命令拉取到本地
1. 将以下四个镜像使用docker pull命令拉取到本地 1. 将以下四个镜像使用docker pull命令拉取到本地
注意如果用户构建jupyterhub镜像需要修改配置文件。 注意如果用户构建jupyterhub镜像需要修改配置文件。
2. 在本地创建pvc 2. 在本地创建pvc
add pvc.yaml file
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: hub-db-dir
labels:
component: jupyter
spec:
storageClassName: "standard" # name of storage class, it will be default storage class if unspecified.
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "200Mi"
kubectl create -f pvc.yaml
===================================================
jupyterhub_config.yaml
# Mount volume for storagepvc_name_template = 'claim-{username}'
volume_name_template = 'volume-{username}'c.KubeSpawner.pvc_name_template = pvc_name_template
c.KubeSpawner.storage_pvc_ensure = True
c.KubeSpawner.storage_class = 'standard' # name of storageclass or default if not specified
c.KubeSpawner.storage_access_modes = ['ReadWriteOnce']
c.KubeSpawner.storage_capacity = '200Mi'# Add volumes to singleuser podsc.KubeSpawner.volumes = [{
'name': volume_name_template,
'persistentVolumeClaim': {
'claimName': pvc_name_template
}
}]c.KubeSpawner.volume_mounts = [{
'mountPath': '/home/jovyan',
'name': volume_name_template
}]
使用kubectl get pv查看pv和kubectl get pvc查看pvc 使用kubectl get pv查看pv和kubectl get pvc查看pvc
3. 部署 3. 部署
4. 查看部署是否成功,运行kubectl get pods命令,显示以下内容 4. 查看部署是否成功,运行kubectl get pods命令,显示以下内容
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论