How to prevent from using same pvc by multiple pods accidentally
Environment
- OpenShift Enterprise
- v3.1.x
Issue
- How to prevent from using same pvc by multiple pods accidentally
- I want to restrict below
step-3. Are there any options to prevent it?
step-1. Create pvc(clam1)
$ oc get pvc
NAME LABELS STATUS VOLUME CAPACITY ACCESSMODES AGE
claim1 <none> Bound pv0001 1Gi RWO 13s
step-2. Create pod(nfs-test) and use above pvc(claim1).
$ oc describe pod nfs-test |grep -1 claim1
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: claim1
step-3. Create another pod(nfs-test2) and use same pvc(claim1).
$ oc describe pod nfs-test2 |grep -1 claim1
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: claim1
Resolution
- No, current version
v3.1.1.6-21-gcd70c35doesn't have a such function. - Please track this RFE bz#1322006
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
