Closed ghost closed 3 years ago
Thank you for your message.
This type of error happens when the provisioner does not support dynamic provisioning. Kubegres specifies in a StatefulSet a storage class name and the wanted size of the volume. It does not do anything else. Then the StatefulSet uses the storage class which dynamically creates PV and PVC.
I suggest you check Kubernetes documentation about this issue.
I am following the getting-started guide: https://www.kubegres.io/doc/getting-started.html I am following it word for word, step by step. No changes whatsoever.
I am running Kubernetes locally Bare Metal. The storageClass I am using is nfs-client (default) and I have it working with other pods and I have it basically wide open:
*(rw,sync,no_subtree_check,no_root_squash)
Kubernetes version:v1.22.2
Docker Container Runtime:docker://20.10.8
I am tailing the logs of the first pod mypostgres-1-0 and it gets as far as this and then it seems to crash.
kubectl logs mypostgres-1-0 -f
After the last line I am back in my terminal and no longer following the logs. I look at the pods and see it has a restart count of 1.
Since it automatically restarts and there is already data in /var/lib/postgresql/data/, none of the initialization scripts will ever run.
No idea why this is happening. Any help would be appreciated.