首页 > 其他分享 >Kubernetes(k8s)集群安装JupyterHub以及Lab

Kubernetes(k8s)集群安装JupyterHub以及Lab

时间:2022-11-04 17:07:23浏览次数:94  
标签:Kubernetes JupyterHub system Lab 16hkube 10.68 TCP ClusterIP hello

背景


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:~#


Kubernetes(k8s)集群安装JupyterHub以及Lab_.net

Kubernetes(k8s)集群安装JupyterHub以及Lab_4s_02


Kubernetes(k8s)集群安装JupyterHub以及Lab_github_03



标签:Kubernetes,JupyterHub,system,Lab,16hkube,10.68,TCP,ClusterIP,hello
From: https://blog.51cto.com/u_12212643/5823969

相关文章

  • kubernetes核心实战(三)--- ReplicationController
    5、ReplicationControllerReplicationController确保在任何时候都有特定数量的Pod副本处于运行状态。换句话说,ReplicationController确保一个Pod或一组同类的Pod总......
  • kubernetes核心实战(一)--- namespace
    kubernetes核心实战1、资源创建方式命令行创建yaml文件创建2、namespace命名空间(namespace)是Kubernetes提供的组织机制,用于给集群中的任何对象组进行分类、筛选和管理。每一......
  • kubernetes(k8s) 存储动态挂载
    使用nfs文件系统实现kubernetes存储动态挂载1.安装服务端和客户端root@hello:~#aptinstallnfs-kernel-servernfs-common其中nfs-kernel-server为服务端,nfs-comm......
  • kubernetes(k8s)安装命令行自动补全功能
    Ubuntu下安装命令root@master1:~#aptinstall-ybash-completionReadingpackagelists...DoneBuildingdependencytreeReadingstateinformation...Donebash-c......
  • kubernetes(k8s)中部署dashboard可视化面板
    Web界面(Dashboard)Dashboard是基于网页的Kubernetes用户界面。你可以使用Dashboard将容器应用部署到Kubernetes集群中,也可以对容器应用排错,还能管理集群资源。你......
  • MATLAB:方波信号square函数的使用
    matlab中生成方波可以使用符号函数和正弦函数的复合函数,利用符号函数的正负性和正弦函数的周期性达到生成方波的效果。也可以通过封装好的函数square()进行生成 t=0......
  • 使用LabVIEW实现基于pytorch的DeepLabv3图像语义分割
     前言今天我们一起来看一下如何使用LabVIEW实现语义分割。一、什么是语义分割图像语义分割(semanticsegmentation),从字面意思上理解就是让计算机根据图像的语义来进......
  • MATLAB使用手记(一):绘制余弦信号图形
    前言记录下matlab使用过程的一些应用笔记基本余弦信号\[f(x)=A\cos(\omegat+\phi)=A\cos(2\pift+\phi)\]余弦信号基本公式如上,其中\(A\)是振幅、\(f\)是频率,\(\ome......
  • Kubernetes K8S之鉴权RBAC详解
    KubernetesK8S之鉴权RBAC详解https://www.cnblogs.com/zhanglianghhh/p/14128332.html KubernetesK8S之鉴权概述与RBAC详解 K8S认证与授权 认证「Authent......
  • 在matlab中使用模糊编辑器实现模糊控制器的设计详解
    目录一、理论基础二、核心程序三、测试结果一、理论基础所谓模糊控制技术是指通过模糊集合和模糊逻辑等原理,并且和经典的控制理论相结合,并通过模拟人类的思考方式,对一......