How does Kubernetes know on which node to schedule its POD when PVs are backed by logical volumes?

6/14/2019

If i implement a CSI driver that will create logical volumes via lvcreate command, and give those volumes for Kubernetes to make PVs from, how will Kubernetes know the volume/node association so that it can schedule a POD which uses this PV on the node where my newly-created logical volume resides? Does it just automagically happen?

-- J.Doe
kubernetes

1 Answer

6/14/2019

k8s Scheduler can be influenced using volume topology.

Here is the design proposal which walks through the whole dimension

Allow topology to be specified for both pre-provisioned and dynamic provisioned PersistentVolumes so that the Kubernetes scheduler can correctly place a Pod using such a volume to an appropriate node. Volume Topology-aware Scheduling

-- Suresh Vishnoi
Source: StackOverflow