1.NFS

      1.test001安装NFS (https://www.cnblogs.com/st-jun/p/7742560.html)

      2.权限、目录设置

[root@test001 home]# cat /etc/exports
/new_disk/nfs    192.168.56.0/24(rw,anonuid=1000,anongid=100)
[root@test001 home]# 

      3.修改pv.yaml

2.版本

 

[root@test001 home]# helm list
NAME            REVISION        UPDATED                         STATUS          CHART                   APP VERSION     NAMESPACE
jhub            12              Thu Aug 22 17:39:48 2019        DEPLOYED        jupyterhub-0.9-2d435d6  1.0.0           jhub 


3.宿主机目录、权限

 

useradd -u 1000 -g 100 jovyan

usermod -a -G root jovyan

uid=1000(jovyan) gid=100(users) 组=100(users),0(root)

[root@test001 home]# ll /new_disk/
总用量 20
drwsrwsr-x 2 jovyan users 16384 8月  22 14:46 lost+found
drwxr-xr-x 3 jovyan users  4096 8月  22 17:41 nfs
[root@test001 home]# 
proxy:
  secretToken: "461e64c9907351b6cd18152da94e49cbeb903427a74e28a7ee12e9b2f39062a2"
  service:
    type: LoadBalancer
hub:
  uid: 1000
  fsGid: 1000
  image:
    name: jupyterhub/k8s-hub
    tag: 0.9-dcde99a
  db:
    type: mysql
    url: mysql+pymysql://root:123456@192.168.56.104:3306/jupyterk8s
  extraConfig: |-
    config = '/etc/jupyter/jupyter_notebook_config.py'
    c.Spawner.cmd = ['jupyter-labhub']
    ===================host===便于和spark/yarn集群通信,达到容器里提交到外部集群========
    c.KubeSpawner.extra_pod_config = {
        'hostNetwork': True,
        'hostPID': True
    }
singleuser:
  uid: 1000
  fsGid: 100
  defaultUrl: "/lab"
  image:
    name: jupyter/all-spark-notebook
    tag: 2ce7c06a61a1
  storage:
    type: "static"
    static:
      pvcName: "hub-db-dir"
      subPath: 'home/{username}'
  extraEnv:
    CHOWN_HOME: 'yes'
  memory:
    limit:
    guarantee: 1G
auth:
  type: ldap
  ldap:
    server:
      address: 192.168.56.105:389
    dn:
      templates:
        - 'uid={username},ou=jupyterhub,dc=tom,dc=com'

 python kernel success

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐