Skip to content

Terminated pods keep volumes attached to the node #45191

@gnufied

Description

@gnufied

Currently in Kubernetes when a pod is terminated (but not deleted from api server), the volume - pod was using although is unmounted from node is still kept attached to the node.

This creates problems if user tries to create another pod using same PVC.

Currently kubelet has a flag called --keep-terminated-pod-volumes that can force the volume to be mounted on the node for terminated pods (the flag isn't set by default). In such case, attach/detach controller shouldn't do force detach of the volume.

cc @kubernetes/sig-storage-bugs @eparis @ncdc

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions