mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 22:40:12 +01:00
feat(migration): adding support to migrate the PV to a new node (#304)
Usecase: A node in the Kubernetes cluster is replaced with a new node. The new node gets a different `kubernetes.io/hostname`. The storage devices that were attached to the old node are re-attached to the new node. Fix: Instead of using the default `kubenetes.io/hostname` as the node affinity label, this commit changes to use `openebs.io/nodeid`. The ZFS LocalPV driver will pick the value from the nodes and set the affinity. Once the old node is removed from the cluster, the K8s scheduler will continue to schedule applications on the old node only. User can now modify the value of `openebs.io/nodeid` on the new node to the same value that was available on the old node. This will make sure the pods/volumes are scheduled to the node now. Note: Now to migrate the PV to the other node, we have to move the disks to the other node and remove the old node from the cluster and set the same label on the new node using the same key, which will let k8s scheduler to schedule the pods to that node. Other updates: * adding faq doc * renaming the config variable to nodename Signed-off-by: Pawan <pawan@mayadata.io> Co-authored-by: Akhil Mohan <akhilerm@gmail.com> * Update docs/faq.md Co-authored-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
parent
da7f4c2320
commit
1b30116e5f
12 changed files with 104 additions and 34 deletions
|
|
@ -37,7 +37,7 @@ spec:
|
|||
type: string
|
||||
- description: Node where the volume is created
|
||||
jsonPath: .spec.ownerNodeID
|
||||
name: Node
|
||||
name: NodeID
|
||||
type: string
|
||||
- description: Size of the volume
|
||||
jsonPath: .spec.capacity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue