Hey Vignesh,
I see that the two issues are:
- Data Persistence
- For this could you try adding extra mounts from the host onto the Kind worker container? This way you could use a hostPath of that path onto your Dgraph cluster? The config for which would look like this - config.yaml · GitHub ( you’d need to create the directories locally, say,
mkdir -p ~/dgraph-host-mount/alpha ~/dgraph-host-mount/zeroand reflect that path ontoconfig.yaml). The data survives adocker restart.
- For this could you try adding extra mounts from the host onto the Kind worker container? This way you could use a hostPath of that path onto your Dgraph cluster? The config for which would look like this - config.yaml · GitHub ( you’d need to create the directories locally, say,
- Ensure Dgraph shuts down cleanly when the GKE preemption happens
- For this it’d be worthwhile to check out a preemption killer like GitHub - estafette/estafette-gke-preemptible-killer: Kubernetes controller to spread preemption for preemtible VMs in GKE to avoid mass deletion after 24 hours that can do the restart predictably and give you enough time to cleanup Dgraph shutdown via a decent enough
terminationGracePeriodSecondsset on the statefulset.
- For this it’d be worthwhile to check out a preemption killer like GitHub - estafette/estafette-gke-preemptible-killer: Kubernetes controller to spread preemption for preemtible VMs in GKE to avoid mass deletion after 24 hours that can do the restart predictably and give you enough time to cleanup Dgraph shutdown via a decent enough
If you want to run a “multi-node” KIND cluster or a 6 node Dgraph cluster(for which you’d need a volumeClaimTemplate), you might want to check out a dynamic hostpath provisioner like GitHub - rimusz/hostpath-provisioner: Dynamic Provisioning of Kubernetes HostPath Volumes(haven’t tested)
Please check if this helps. 