jupyterhub on k8s 配置用户名密码 + 自定义镜像
如果只是小组内使用 不想共用密码 也不想搞复杂认证方案 那么就直接通过map(用户名,密码md5值)来制定密码
jupyter on k8s官方教程
安装 JupyterHub — Kubernetes 文档从零开始使用 JupyterHub - Jupyter 中文
config.yaml部分内容
可以替换为连接密码数据库
hub:
config:
JupyterHub:
shutdown_on_logout: true # 用户logout 自动stop jupyter pod,家目录下所有文件会被保存到pvc 即启动后之前家目录下文件都在. 配置对应 c.JupyterHub.shutdown_on_logout
ServerApp:
shutdown_no_activity_timeout: 60 # 单位s 超过该时间没活动 jupyter pod会被关闭
extraConfig:
# 添加自定义的 Python 配置
custom_config.py: |
from jupyterhub.auth import Authenticator
def md5(password):
imp