一、环境
CPU:Hygon C86 7285 32-core Processor
操作系统:麒麟操作系统
containerd:1.7.27
Kubernetes:1.26.12
KubeSphere:4.1.2
kubekey:3.1.10
Zookeeper:3.9.3
二、现象
执行:
kubectl apply -f zookeeper-deployment.yaml -n cz-zhjg
报错内容:
0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling..
ZooKeeper Pod (zookeeper-0) 处于 Pending 状态,表明Pod 无法启动是因为它依赖的 PersistentVolumeClaim (PVC) 没有绑定到任何 PersistentVolume (PV)。
三、解决方案
3.1检查现有的 PVC
kubectl get pvc -n cz-zhjg
PVC 已经创建但尚未绑定到任何 PV
3.2手动创建 PV
创建如下 PV 定义文件(pv-definition.yaml)
apiVersion: v1
kind: PersistentVolume
metadata:
name: zookeeper-data-pv
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: default
ho

最低0.47元/天 解锁文章
5185

被折叠的 条评论
为什么被折叠?



