背景

JupyterHub 为用户组带来了笔记本的强大功能。它使用户能够访问计算环境和资源,而不会给用户带来安装和维护任务的负担。用户——包括学生、研究人员和数据科学家——可以在他们自己的工作空间中完成他们的工作,共享资源可以由系统管理员有效管理。

JupyterHub 在云端或您自己的硬件上运行,可以为世界上的任何用户提供预先配置的数据科学环境。它是可定制和可扩展的,适用于小型和大型团队、学术课程和大型基础设施。

第一步、参考:https://cloud.tencent.com/developer/article/1902519 创建动态挂载存储

第二步、安装helm

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

第三步、导入镜像

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

第四步、安装jupyterhub

helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/

helm repo update

helm upgrade --cleanup-on-fail \
--install ju jupyterhub/jupyterhub \
--namespace ju \
--create-namespace \
--version=1.2.0 \
--values config.yaml

注:此文件可以自定义内容,具体看注释,如下开启lab功能

root@hello:~# vim config.yaml
root@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  -A
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.68.0.1 <none> 443/TCP 16h
ju hub ClusterIP 10.68.60.16 <none> 8081/TCP 114s
ju proxy-api ClusterIP 10.68.239.54 <none> 8001/TCP 114s
ju proxy-public LoadBalancer 10.68.62.47 <pending> 80:32070/TCP 114s
kube-system dashboard-metrics-scraper ClusterIP 10.68.244.241 <none> 8000/TCP 16h
kube-system kube-dns ClusterIP 10.68.0.2 <none> 53/UDP,53/TCP,9153/TCP 16h
kube-system kube-dns-upstream ClusterIP 10.68.221.104 <none> 53/UDP,53/TCP 16h
kube-system kubernetes-dashboard NodePort 10.68.206.196 <none> 443:32143/TCP 16h
kube-system metrics-server ClusterIP 10.68.1.149 <none> 443/TCP 16h
kube-system node-local-dns ClusterIP None <none> 9253/TCP 16h
root@hello:~# kubectl edit svc proxy-public -n ju
service/proxy-public edited
root@hello:~#
root@hello:~#
root@hello:~# kubectl get svc -A
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.68.0.1 <none> 443/TCP 16h
ju hub ClusterIP 10.68.60.16 <none> 8081/TCP 2m19s
ju proxy-api ClusterIP 10.68.239.54 <none> 8001/TCP 2m19s
ju proxy-public NodePort 10.68.62.47 <none> 80:32070/TCP 2m19s
kube-system dashboard-metrics-scraper ClusterIP 10.68.244.241 <none> 8000/TCP 16h
kube-system kube-dns ClusterIP 10.68.0.2 <none> 53/UDP,53/TCP,9153/TCP 16h
kube-system kube-dns-upstream ClusterIP 10.68.221.104 <none> 53/UDP,53/TCP 16h
kube-system kubernetes-dashboard NodePort 10.68.206.196 <none> 443:32143/TCP 16h
kube-system metrics-server ClusterIP 10.68.1.149 <none> 443/TCP 16h
kube-system node-local-dns ClusterIP None <none> 9253/TCP 16h
root@hello:~#

https://blog.csdn.net/qq_33921750

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

https://www.zhihu.com/people/chen-bu-yun-2

https://segmentfault.com/u/hppyvyv6/articles

https://juejin.cn/user/3315782802482007

https://space.bilibili.com/352476552/article

https://cloud.tencent.com/developer/column/93230

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

Kubernetes(k8s)集群安装JupyterHub以及Lab的更多相关文章

  1. Kubernetes(k8s)集群安装

    一:简介 二:基础环境安装 1.系统环境 os Role ip Memory Centos 7 master01 192.168.25.30 4G Centos 7 node01 192.168.25 ...

  2. kubernetes(k8s)集群安装calico

    添加hosts解析 cat /etc/hosts 10.39.7.51 k8s-master-51 10.39.7.57 k8s-master-57 10.39.7.52 k8s-master-52 ...

  3. K8s集群安装--最新版 Kubernetes 1.14.1

    K8s集群安装--最新版 Kubernetes 1.14.1 前言 网上有很多关于k8s安装的文章,但是我参照一些文章安装时碰到了不少坑.今天终于安装好了,故将一些关键点写下来与大家共享. 我安装是基 ...

  4. [转帖]K8s集群安装--最新版 Kubernetes 1.14.1

    K8s集群安装--最新版 Kubernetes 1.14.1 http://www.cnblogs.com/jieky/p/10679998.html 原作者写的比较简单 大略流程和跳转的多一些 改天 ...

  5. Centos7 安装部署Kubernetes(k8s)集群

    目录 一.系统环境 二.前言 三.Kubernetes 3.1 概述 3.2 Kubernetes 组件 3.2.1 控制平面组件 3.2.2 Node组件 四.安装部署Kubernetes集群 4. ...

  6. Istio(二):在Kubernetes(k8s)集群上安装部署istio1.14

    目录 一.模块概览 二.系统环境 三.安装istio 3.1 使用 Istioctl 安装 3.2 使用 Istio Operator 安装 3.3 生产部署情况如何? 3.4 平台安装指南 四.Ge ...

  7. Kubernetes(k8s)集群部署(k8s企业级Docker容器集群管理)系列之自签TLS证书及Etcd集群部署(二)

    0.前言 整体架构目录:ASP.NET Core分布式项目实战-目录 k8s架构目录:Kubernetes(k8s)集群部署(k8s企业级Docker容器集群管理)系列目录 一.服务器设置 1.把每一 ...

  8. K8S集群安装部署

    K8S集群安装部署   参考地址:https://www.cnblogs.com/xkops/p/6169034.html 1. 确保系统已经安装epel-release源 # yum -y inst ...

  9. 使用kubectl管理Kubernetes(k8s)集群:常用命令,查看负载,命名空间namespace管理

    目录 一.系统环境 二.前言 三.kubectl 3.1 kubectl语法 3.2 kubectl格式化输出 四.kubectl常用命令 五.查看kubernetes集群node节点和pod负载 5 ...

  10. Kubernetes(k8s)集群部署(k8s企业级Docker容器集群管理)系列目录

    0.目录 整体架构目录:ASP.NET Core分布式项目实战-目录 k8s架构目录:Kubernetes(k8s)集群部署(k8s企业级Docker容器集群管理)系列目录 一.感谢 在此感谢.net ...

随机推荐

  1. Coder vs Programmer: Difference You Should Know

    In this tech-driven world, you may have heard the terms 'coder' and 'programmer' used interchangeabl ...

  2. ZXing 生成二维码和条形码(添加NuGet包)

  3. pytorch 简简单单求个值

    能用张量处理就用张量,不要使用for in 跑循环,一个是容易出错,一个是比较浪费时间,应用广播机制的话去做很容易的 1.5 使用mean处理平均值 2. 在处理梯度的时候无法更改自身,因此使用的办法 ...

  4. mybatis-plus 3.4.3.1 进行批量 saveOrUpdate

    service类通过 SqlHelper.saveOrUpdateBatch 实现通过自定义的 唯一索引 进行 批量保存更新 import com.baomidou.mybatisplus.core. ...

  5. Component inside <Transition> renders non-element root node that cannot be animated

    原因是transition标签下存在多个根标签 原代码: 解决方法 Suspense还处于试验阶段,可能导致default内容与fallback内容同时存在,导致错误

  6. POJ3723 Conscription 题解

    start: 2021-08-04 16:56:50 题目链接: http://poj.org/problem?id=3723 题目内容: Description Windy has a countr ...

  7. django_静态文件

    **************************************************************************************************** ...

  8. toString能转换number类型吗

    let num = 60console.log(toString(num)) // [object Undefined] console.log(String(num)) // 60

  9. 这几年专注于流程管理与RPA落地

    这些年专注于流程管理与RPA落地,乙方有些辛苦,但,也得到了客户的认可,开心. 做过多个流程管理咨询,发现信息化落地后孤岛很多,RPA 刚好可以作为各个系统的有效补充,把系统有机的结合在一起. 企业信 ...

  10. PASS模型小程序设计阶段-里程碑第三组

    班级网址 https://edu.cnblogs.com/campus/zjcsxy/SE2020 作业要求 https://edu.cnblogs.com/campus/zjcsxy/SE2020/ ...