Skip to content

How to provision a volume to multiple namespaces? #189

Answered by sergeyberezansky
derselbst asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
According to official Kubernetes documentation, a single storage entity can be represented by a single PersistentVolume only.
However, there might be multiple PersistentVolumeClaims (in different namespaces as well) that point to same persistent volume.
PersistentVolume objects are also global and not bound to any namespace for that very reason.
Obviously, the volume should be provisioned statically.

To use PersistentVolumeClaim in each Namespace:
Create a separate PersistentVolumeClaim in each namespace that references the same underlying PersistentVolume. For example:

# Namespace: namespace-1
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-pvc
  namespace: namespa…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@derselbst
Comment options

Answer selected by sergeyberezansky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants