K8S+Helm 安装 Jupyterhub
生活随笔
收集整理的這篇文章主要介紹了
K8S+Helm 安装 Jupyterhub
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
準備配置文件
生成隨機數
openssl rand -hex 32 # 8fc2826e9ce6930ec26c9fd541c0620b448a947357edbdf9647516af16bbc798配置config.yaml如下,token是上一步生成
proxy:secretToken: "8fc2826e9ce6930ec26c9fd541c0620b448a947357edbdf9647516af16bbc798"安裝JupyterHub
安裝完成后會有如下顯示
Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "sqlfiddle" chart repository ...Successfully got an update from the "jupyterhub" chart repository ...Successfully got an update from the "emberstack" chart repository Update Complete. ? Happy Helming!?創建helm-install-hupyterhub.sh文件,并復制如下進去:
cat > config.yaml <<EOF hub:db:type: sqlite-memorysingleuser:storage:type: noneproxy:secretToken: "215c5723173367248f8922d2911f7d3a110e36824f847bdaaa7269cb75868ca7" EOF# Suggested values: advanced users of Kubernetes and Helm should feel # free to use different values. RELEASE=jhub NAMESPACE=jhubhelm upgrade --install $RELEASE jupyterhub/jupyterhub \--namespace $NAMESPACE \--version=0.9.0 \--values config.yaml創建k8s的jhub namespace
kubectl create ns jhub注意:遇到問題:Release “jupyterhub” does not exist. Installing it now.,
# 在master節點執行 kubectl get pod --namespace jhub # 查看pod節點異常情況 kubectl describe po hook-image-puller-h9mwm --namespace jhub錯誤原因是 鏡像無法拉取
打開代理環境,獲取鏡像
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.13.12 docker pull gcr.io/google_containers/pause:3.1當部署成功時
kubectl -n jhub get po # continuous-image-puller-x5fwx 1/1 Running 0 4m45s # hub-75d769476f-tdz8l 1/1 Running 0 4m45s # proxy-d769dd5db-c7pqf 1/1 Running 0 4m45s # user-scheduler-64b57d78d5-8dv7s 1/1 Running 0 4m45s # user-scheduler-64b57d78d5-zk2cb 1/1 Running 0 4m45s kubectl get service --namespace jhub # hub ClusterIP 10.99.233.188 <none> 8081/TCP 6m12s # proxy-api ClusterIP 10.100.28.140 <none> 8001/TCP 6m12s # proxy-public LoadBalancer 10.104.115.249 localhost 443:32556/TCP,80:30533/TCP 6m12s修改proxy-public svc 將 type: LoadBalancer 改成 type: NodePort
kubectl edit service proxy-public -n jhub查看service
kubectl get service --namespace jhub # hub ClusterIP 10.99.233.188 <none> 8081/TCP 16m # proxy-api ClusterIP 10.100.28.140 <none> 8001/TCP 16m # proxy-public NodePort 10.104.115.249 <none> 443:32556/TCP,80:30533/TCP 16m?
此時我們在瀏覽器中通過 80 映射的端口去訪問jupyterhub
jupyterhub的默認用戶:bi:bi
測試運行
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的K8S+Helm 安装 Jupyterhub的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: wstring和string简单正则表达
- 下一篇: c++跨平台写法