nfs-subdir-external-provisioner icon indicating copy to clipboard operation
nfs-subdir-external-provisioner copied to clipboard

Explicit declaration, that can survive disaster recovery rebuild?

Open BloodyIron opened this issue 3 years ago • 0 comments

So I quite like this nfs-subdir-external-provisioner, however there's part of my Disaster Recovery plan where I THINK it falls short. Or maybe I don't know how to use it properly. Allow me to explain.

So I use argo-cd for my CD, it watches repos and deploys yaml code. Pretty common function.

I have a repo where all the "core" parts of the cluster (this is all self-hosted btw, on-prem, no public cloud stuff) are defined in yaml, and this includes the nfs-subdir-external-provisioner. This repo is intended to be, naturally, the single-source of truth for how these aspects run. This includes load balancer stuff (MetalLB), argo-cd itself, and a few other things.

The expectation is that if I need to rebuild my k8s cluster from literally nothing, that I import these yaml files, and it rebuilds absolutely everything (from that, and other repos).

The challenge I have is matching the persistent volume claims that were defined in the "previous cluster" (before utter destruction) and those PVCs in the "new cluster".

My understanding is that the behaviour is when deployments spin up requesting a PVC, that it would create new blank PVCs, instead of connecting to the ones that were used in the "previous cluster", even though that data would still be on the NFS server with the same GUID or whatnot.

What I want to figure out, is a method whereby I can declare PVCs in deployments such that rebuilding the cluster from scratch results in all deployments having PVCs properly connect to the data that's already on the NFS server, without having to have new PVCs made by nfs-subdir-external-provisioner.

Is this possible? If so, how? And if not, can we get this added as a feature please and on a roadmap or something?

I'm trying to plan for the worst and streamline things here as I build out this environment, and this is one rather important detail I'd like to not have to worry about in a DR scenario.

Currently it LOOKS like I would need to go to each new PVC and copy the data (and all permissions, etc) from the old GUIDs/folders into the new ones... assuming I know which ones correctly aligned with which ones...

BloodyIron avatar Aug 09 '22 00:08 BloodyIron