The PVC is no longer creating the PV. So, we need to fix it. See that the postgresql is pending because is not possible to do the bound.
$ kubectl get events -n postgresql-operator
LAST SEEN TYPE REASON OBJECT MESSAGE
<unknown> Warning FailedScheduling pod/database-6896fdcbc-2dl4d persistentvolumeclaim "database" not found
<unknown> Warning FailedScheduling pod/database-6896fdcbc-2dl4d persistentvolumeclaim "database" not found
<unknown> Warning FailedScheduling pod/database-6896fdcbc-2dl4d running "VolumeBinding" filter plugin for pod "database-6896fdcbc-2dl4d": pod has unbound immediate PersistentVolumeClaims
<unknown> Warning FailedScheduling pod/database-6896fdcbc-g9dgj persistentvolumeclaim "database" not found
<unknown> Warning FailedScheduling pod/database-6896fdcbc-nlhc2 running "VolumeBinding" filter plugin for pod "database-6896fdcbc-nlhc2": pod has unbound immediate PersistentVolumeClaims
81s Normal SuccessfulCreate replicaset/database-6896fdcbc Created pod: database-6896fdcbc-2dl4d
81s Normal ScalingReplicaSet deployment/database Scaled up replica set database-6896fdcbc to 1
5s Normal ExternalProvisioning persistentvolumeclaim/database waiting for a volume to be created, either by external provisioner "k8s.io/minikube-hostpath" or manually created by system administrator
<unknown> Normal Scheduled pod/postgresql-operator-7cb8ccccd4-jrb5n Successfully assigned postgresql-operator/postgresql-operator-7cb8ccccd4-jrb5n to minikube
97s Normal Pulling pod/postgresql-operator-7cb8ccccd4-jrb5n Pulling image "quay.io/camilamacedo86/postgresql-operator:test"
90s Normal Pulled pod/postgresql-operator-7cb8ccccd4-jrb5n Successfully pulled image "quay.io/camilamacedo86/postgresql-operator:test"
90s Normal Created pod/postgresql-operator-7cb8ccccd4-jrb5n Created container postgresql-operator
89s Normal Started pod/postgresql-operator-7cb8ccccd4-jrb5n Started container postgresql-operator
98s Normal SuccessfulCreate replicaset/postgresql-operator-7cb8ccccd4 Created pod: postgresql-operator-7cb8ccccd4-jrb5n
98s Normal ScalingReplicaSet deployment/postgresql-operator Scaled up replica set postgresql-operator-7cb8ccccd4 to 1
$ kubectl get all -n postgresql-operator
NAME READY STATUS RESTARTS AGE
pod/database-6896fdcbc-2dl4d 0/1 Pending 0 78s
pod/postgresql-operator-7cb8ccccd4-jrb5n 1/1 Running 0 95s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/database ClusterIP 10.100.130.78 <none> 5432/TCP 78s
service/postgresql-operator-metrics ClusterIP 10.102.97.170 <none> 8383/TCP,8686/TCP 80s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/database 0/1 1 0 78s
deployment.apps/postgresql-operator 1/1 1 1 95s
NAME DESIRED CURRENT READY AGE
replicaset.apps/database-6896fdcbc 1 1 0 78s
replicaset.apps/postgresql-operator-7cb8ccccd4 1 1 1 95s
Bug Report
What did you do?
The PVC is no longer creating the PV. So, we need to fix it. See that the postgresql is pending because is not possible to do the bound.