Kubernetes NFS "Initializing nextcloud" forever

Hi All,

I have seen a lot of posts here, reddit etc about issues of the crashloop of “Initializing nextcloud” container using NFS either in docker or as a PVC in kubernetes. I have not seen a definitive answer as to how to fix this issue.

I am deploying via helm to a kube 1.29 cluster.

I have tested this with a PV/PVC predefined and I can see it populates the volume as its coming up but then it hangs with the Initializing nextcloud crash loop

I have also tested with an NFS provisioner, I can see it creates and binds the PVC and populates the volume and then hangs with the Initializing nextcloud crash loop.

If I disable persistence nextcloud comes right up. Mariadb and redis are both configured with persistence and they both work fine.

Any help would be greatly appreciated.

Thanks

Chances are the initialization would likely complete (if given enough time), but it’s not as performant as desired in your environment for some reason. e.g. see cannot initialize nextcloud when enable persistence on kubernetes · Issue #1006 · nextcloud/docker · GitHub

NFS (particularly un-tuned or DIY) is not good at handling the movement of lots of small files (and that’s what happens at initialization time).

Your options are probably:

  • extend the readiness probe timeouts (since it will likely complete… eventually)
  • tune your NFS service
  • switch to some other K8S compatible persistent storage medium