我尝试在Kubernetes中设置StorageClass和PersistanceVolumeClaim,但现在遇到了无法正常工作的问题。
我所拥有的:
格卢斯特夫斯----南苏丹亚姆勒
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: gluster-heketi
provisioner: kubernetes.io/glusterfs
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
parameters:
resturl: "http://server_ip:8080"
restuser: "admin"
restuserkey: "key"
volumetype: "replicate:3"
volumenameprefix: "vol"
clusterid: "cluster_id"
玻璃纤维-聚氯乙烯.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gluster-pvc
spec:
storageClassName: gluster-heketi
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
豆荚yaml
apiVersion: v1
kind: Pod
metadata:
name: gluster-pod
labels:
name: gluster-pod
spec:
containers:
- name: gluster-pod
image: busybox
command: ["sleep", "60000"]
volumeMounts:
- name: gluster-vol
mountPath: /usr/share/busybox
readOnly: false
volumes:
- name: gluster-vol
persistentVolumeClaim:
claimName: gluster-pvc
PersistentVolumeClaim仍处于 * 挂起 * 状态,pod显示消息 “0/5个节点可用:pod具有未绑定的即时PersistentVolumeClaims。抢占:0/5个节点可用:5未找到传入Pod的抢占受害者..'
我期待这个教程https://computingforgeeks.com/configure-kubernetes-dynamic-volume-provisioning-with-heketi-glusterfs/
1条答案
按热度按时间atmip9wb1#
解决!
在这之后..