I just tried out the quickstart (introduced with #289), but I don't know how to access the new "acid-minimal-cluster" PostgreSQL cluster:
$ kubectl create -f manifests/configmap.yaml # configuration
configmap "postgres-operator" created
$ kubectl create -f manifests/operator-service-account-rbac.yaml # identity and permissions
serviceaccount "zalando-postgres-operator" created
clusterrole "zalando-postgres-operator" created
clusterrolebinding "zalando-postgres-operator" created
$ kubectl create -f manifests/postgres-operator.yaml # deployment
deployment "postgres-operator" created
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
postgres-operator-6474c766b4-tgp82 1/1 Running 0 8s
$ kubectl create -f manifests/minimal-postgres-manifest.yaml
postgresql "acid-minimal-cluster" created
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
acid-minimal-cluster-0 0/1 Pending 0 2s
postgres-operator-6474c766b4-tgp82 1/1 Running 0 17s
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
acid-minimal-cluster-0 1/1 Running 0 20s
acid-minimal-cluster-1 1/1 Running 0 6s
postgres-operator-6474c766b4-tgp82 1/1 Running 0 35s
$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
acid-minimal-cluster LoadBalancer 10.102.211.199 <pending> 5432:32114/TCP 25s
acid-minimal-cluster-repl ClusterIP 10.106.83.140 <none> 5432/TCP 25s
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 1m
$ minikube service acid-minimal-cluster
Waiting, endpoint for service is not ready yet...
The service will never become ready as it's of type LoadBalancer.
FYI: We are looking into this right now.
@hjacobs thanks for finding this out !
Overall, this behavior seems to be minikube-specific and relates to the recent upgrades that made minikube use Kubernetes 1.10+
It should be fully resolved once a Spilo image with a Patroni >= v1.4.4 is out because of that:
Kubernetes 1.10.0+ started returning
Endpoints.subsetsset toNoneinstead of[].
Kudos to @mgomezch for remembering this bug just in time !
There are other configuration issues here, but these I've already fixed and am currently preparing a PR
@hjacobs Can you please confirm the updated quickstart works ? Just do
git clone https://github.com/zalando-incubator/postgres-operator.git
cd postgres-operator
git checkout --track origin/fix-conf-for-minikube
and then these instruction should work.
The service will never become ready as it's of type LoadBalancer.
Clarification: we actually need service of such type here for it to be accessible outside of minikube. Such services run fine on minikube.
@zerg-junior first observation, one might need to wait some seconds:
kubectl create -f manifests/minimal-postgres-manifest.yaml
error: unable to recognize "manifests/minimal-postgres-manifest.yaml": no matches for acid.zalan.do/, Kind=postgresql
Apart from this minor problem (retrying works), the instructions are fine and I could successfully connect to the database :smile:
one might need to wait some seconds:
Yes, that's true. The run_operator_locally script actually retries until timeout; I am just unsure how to indicate such behavior in quickstart beyond a simple comment.
And I totally overlooked all these issues just because I was assuming that if pods successfully start with Patroni, than everyhing is fine; had no idea that Patroni failed to create endpoints. More end-user testing for me in the future )))
Addressed by #301
Not only minikube. I have the same problem with a three nodes cluster ! any ideas ?
Most helpful comment
FYI: We are looking into this right now.