一如既往地感谢大家的帮助,我再次带着融化的大脑来寻求帮助。
环境设置:
3 个运行 Kubernetes Kubeadm 安装的 Ubuntu 虚拟机
MetalLB 部署作为 K8s 的负载均衡器
没有开箱即用的存储类或卷。
我一直在尝试使用 helm 简单地安装 Jupyterhub,并且不断遇到各种问题,但当我尝试安装它时,最近的一个问题真是令人头疼。
此时我确实需要一些有关简单“本地存储”安装的帮助,然后在将来使用 NFS 来存储用户数据。从零到 Jupyterhub 文档很有帮助,但遗憾的是,不适用于这个问题。
dev@control1:~/jupyterhub$ helm upgrade --install jhub jupyterhub-1.2.0.tgz --values config.yml
Error: UPGRADE FAILED: pre-upgrade hooks failed: timed out waiting for the condition
dev@control1:~/jupyterhub$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
jhub default 2 2022-01-10 18:16:58.570337598 +0000 UTC failed jupyterhub-1.2.0 1.5.0
这是我的 config.yml 值:
proxy:
secretToken: "xxxxxx"
singleuser:
storage:
type: dynamic
dynamic:
storageClass: local-storage
debug:
enabled: true
这是我的本地存储的存储类别:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "true"
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
我尝试了各种持久卷文件,但没有任何效果,所以我无论如何都会在这里列出它们:
集线器持久卷:
apiVersion: v1
kind: PersistentVolume
metadata:
name: hub-db-pv
spec:
capacity:
storage: 1Gi
# volumeMode field requires BlockVolume Alpha feature gate to be enabled.
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: local-storage
local:
path: /tmp/jhub
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- worker1
开始安装过程后,这些是唯一启动的 Pod:
NAME READY STATUS RESTARTS AGE
pod/hook-image-awaiter--1-brl2q 1/1 Running 0 47s
pod/hook-image-puller-9fghk 1/1 Running 0 47s
pod/hook-image-puller-scp88 1/1 Running 0 47s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 46d
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/hook-image-puller 2 2 2 2 2 <none> 48s
NAME COMPLETIONS DURATION AGE
job.batch/hook-image-awaiter 0/1 48s 48s
helm 调试日志显示:
Error: INSTALLATION FAILED: failed pre-install: timed out waiting for the condition
helm.go:88: [debug] failed pre-install: timed out waiting for the condition
INSTALLATION FAILED
main.newInstallCmd.func2
helm.sh/helm/v3/cmd/helm/install.go:127
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
runtime/proc.go:225
runtime.goexit
runtime/asm_amd64.s:1371
kubectl 事件没有显示任何异常:
44m Normal SuccessfulCreate daemonset/hook-image-puller Created pod: hook-image-puller-scp88
44m Normal SuccessfulCreate daemonset/hook-image-puller Created pod: hook-image-puller-9fghk
35m Normal SuccessfulCreate daemonset/hook-image-puller Created pod: hook-image-puller-cx7sb
35m Normal SuccessfulCreate daemonset/hook-image-puller Created pod: hook-image-puller-mw6cd
9m10s Normal SuccessfulCreate daemonset/hook-image-puller Created pod: hook-image-puller-pgt4n
9m10s Normal SuccessfulCreate daemonset/hook-image-puller Created pod: hook-image-puller-p6h49
再次感谢您的帮助!
这个问题你是怎么解决的?