Closed enrichman closed 5 months ago
I believe this is documented upstream as a limitation: https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode
If you choose to use WaitForFirstConsumer, do not use nodeName in the Pod spec to specify node affinity. If nodeName is used in this case, the scheduler will be bypassed and PVC will remain in pending state. Instead, you can use node selector for kubernetes.io/hostname
Thanks!
Creating a pod without the
nodeName
being specified hangs the provisioning of the PVC, because of theWaitForFirstConsumer
volume binding mode.Test
1) Simple Pod and PVC works :+1:
2) Specifying the
nodeName
where the Pod should be scheduled hangs :red_circle:PVC log:
Fixes
Two possible fixes: 1) set the same node in the PVC with the
volume.kubernetes.io/selected-node
annotation 2) change the storageclassvolumeBindingMode
toImmediate
References
I think this is related, so not sure if this is an actual problem/bug, or not.