背景

JupyterHub 为用户组带来了笔记本的弱小性能。它使用户可能拜访计算环境和资源,而不会给用户带来装置和保护工作的累赘。用户——包含学生、钻研人员和数据科学家——能够在他们本人的工作空间中实现他们的工作,共享资源能够由系统管理员无效治理。

JupyterHub 在云端或您本人的硬件上运行,能够为世界上的任何用户提供事后配置的数据迷信环境。它是可定制和可扩大的,实用于小型和大型团队、学术课程和大型基础设施。

第一步、参考:https://cloud.tencent.com/dev... 创立动静挂载存储

第二步、装置helm

root@hello:~# curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -root@hello:~# sudo apt-get install apt-transport-https --yesroot@hello:~# echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.listroot@hello:~# sudo apt-get updateroot@hello:~# sudo apt-get install helm

第三步、导入镜像

root@hello:~# docker load -i pause-3.5.tarroot@hello:~# docker load -i kube-scheduler.tar

第四步、装置jupyterhub

helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/helm repo updatehelm upgrade --cleanup-on-fail \  --install ju jupyterhub/jupyterhub \  --namespace ju \  --create-namespace \  --version=1.2.0 \  --values config.yaml

注:此文件能够自定义内容,具体看正文,如下开启lab性能

root@hello:~# vim config.yamlroot@hello:~# cat config.yaml # This file can update the JupyterHub Helm chart's default configuration values.# ## # For reference see the configuration reference and default values, but make# # sure to refer to the Helm chart version of interest to you!# ## # Introduction to YAML:     https://www.youtube.com/watch?v=cdLNKUoMc6c# # Chart config reference:   https://zero-to-jupyterhub.readthedocs.io/en/stable/resources/reference.html# # Chart default values:     https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/HEAD/jupyterhub/values.yaml# # Available chart versions: https://jupyterhub.github.io/helm-chart/# #singleuser:  defaultUrl: "/lab"  extraEnv:    JUPYTERHUB_SINGLEUSER_APP: "jupyter_server.serverapp.ServerApp"#singleuser:#  defaultUrl: "/lab"#  extraEnv:#    JUPYTERHUB_SINGLEUSER_APP: "notebook.notebookapp.NotebookApp"root@hello:~# root@hello:~# root@hello:~#

第五步、批改svc为nodeport

root@hello:~# kubectl get svc  -ANAMESPACE     NAME                        TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGEdefault       kubernetes                  ClusterIP      10.68.0.1       <none>        443/TCP                  16hju            hub                         ClusterIP      10.68.60.16     <none>        8081/TCP                 114sju            proxy-api                   ClusterIP      10.68.239.54    <none>        8001/TCP                 114sju            proxy-public                LoadBalancer   10.68.62.47     <pending>     80:32070/TCP             114skube-system   dashboard-metrics-scraper   ClusterIP      10.68.244.241   <none>        8000/TCP                 16hkube-system   kube-dns                    ClusterIP      10.68.0.2       <none>        53/UDP,53/TCP,9153/TCP   16hkube-system   kube-dns-upstream           ClusterIP      10.68.221.104   <none>        53/UDP,53/TCP            16hkube-system   kubernetes-dashboard        NodePort       10.68.206.196   <none>        443:32143/TCP            16hkube-system   metrics-server              ClusterIP      10.68.1.149     <none>        443/TCP                  16hkube-system   node-local-dns              ClusterIP      None            <none>        9253/TCP                 16hroot@hello:~# kubectl edit svc proxy-public -n juservice/proxy-public editedroot@hello:~# root@hello:~# root@hello:~# kubectl get svc  -ANAMESPACE     NAME                        TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGEdefault       kubernetes                  ClusterIP   10.68.0.1       <none>        443/TCP                  16hju            hub                         ClusterIP   10.68.60.16     <none>        8081/TCP                 2m19sju            proxy-api                   ClusterIP   10.68.239.54    <none>        8001/TCP                 2m19sju            proxy-public                NodePort    10.68.62.47     <none>        80:32070/TCP             2m19skube-system   dashboard-metrics-scraper   ClusterIP   10.68.244.241   <none>        8000/TCP                 16hkube-system   kube-dns                    ClusterIP   10.68.0.2       <none>        53/UDP,53/TCP,9153/TCP   16hkube-system   kube-dns-upstream           ClusterIP   10.68.221.104   <none>        53/UDP,53/TCP            16hkube-system   kubernetes-dashboard        NodePort    10.68.206.196   <none>        443:32143/TCP            16hkube-system   metrics-server              ClusterIP   10.68.1.149     <none>        443/TCP                  16hkube-system   node-local-dns              ClusterIP   None            <none>        9253/TCP                 16hroot@hello:~#

https://blog.csdn.net/qq_3392...

https://my.oschina.net/u/3981543

https://www.zhihu.com/people/...

https://segmentfault.com/u/hp...

https://juejin.cn/user/331578...

https://space.bilibili.com/35...

https://cloud.tencent.com/dev...

知乎、CSDN、开源中国、思否、掘金、哔哩哔哩、腾讯云

本文应用 文章同步助手 同步