Есть пример из статьи.
pvc висит в статусе Pending:
ks get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
nfs-pvc Pending standard 1m17s
pod висит в статусе Pending:
ks get po
NAME READY STATUS RESTARTS AGE
nginx-nfs-pod 0/1 Pending 0 1m58s
Что не так? Или как можно еще примонтировать один раздел к нескольким подам?
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-pv
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
path: /opt/nfs
server: nfs.f22
readOnly: false
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Pod
metadata:
name: nginx-nfs-pod
labels:
name: nginx-nfs-pod
spec:
containers:
- name: nginx-nfs-pod
image: fedora/nginx
ports:
- name: web
containerPort: 80
volumeMounts:
- name: nfsvol
mountPath: /usr/share/nginx/html
securityContext:
supplementalGroups: [100003]
volumes:
- name: nfsvol
persistentVolumeClaim:
claimName: nfs-pvc