Persistent Volume Claims Flashcards

(14 cards)

1
Q

What are PersistentVolumes and PersistentVolumeClaims in Kubernetes and who creates each?

A

PersistentVolumes are storage resources created by an administrator and PersistentVolumeClaims are requests for storage created by users who want to use that storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does Kubernetes bind a PersistentVolumeClaim to a PersistentVolume?

A

Kubernetes matches a claim to a volume based on requirements like requested capacity access modes volume mode and storage class and then binds one claim to one volume.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does one to one binding mean for PVCs and PVs and what happens to unused space?

A

Each PVC binds to exactly one PV and other claims cannot use any remaining capacity left in that PV after binding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What happens if no suitable PersistentVolume exists when a PVC is created?

A

The PVC stays in Pending state until a matching PV becomes available and then it can bind automatically when one appears.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you force a claim to bind to a specific volume if multiple volumes could match?

A

You can use labels and selectors on the claim and volumes to target a specific PV during binding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In the lecture example how do you define a basic PVC and what does it request?

A

You define apiVersion v1 kind PersistentVolumeClaim name my claim set accessModes to ReadWriteOnce and request 500MB of storage in resources requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which commands are used to create and view a PVC in Kubernetes?

A

You create it with kubectl create dash f and view it with kubectl get pvc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why can a 500MB PVC bind to a 1Gi PV in the example?

A

A smaller claim can bind to a larger volume if the access mode and other criteria match and there is no better sized volume available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What kubectl command is used to delete a PersistentVolumeClaim?

A

kubectl delete pvc followed by the claim name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What determines what happens to a PersistentVolume when its claim is deleted?

A

The PersistentVolume reclaimPolicy controls whether the PV is retained deleted or recycled after the PVC is removed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the Retain reclaim policy do when the PVC is deleted?

A

Retain keeps the PV and its data and the PV is not made available for reuse until an administrator manually handles it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the Delete reclaim policy do when the PVC is deleted?

A

Delete causes the underlying PV and its storage to be removed automatically when the PVC is deleted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the Recycle reclaim policy attempt to do and why is it deprecated?

A

Recycle tries to scrub data and make the PV reusable by running a recycler pod that deletes files but it is deprecated because it is not secure not portable and does not handle real provider cleanup needs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What modern approach replaces Recycle for safe and scalable storage lifecycle management?

A

The modern approach is dynamic provisioning using StorageClasses and CSI drivers which handle provisioning and cleanup more reliably.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly