lwolf / stolon-chart

Kubernetes Helm chart to deploy HA Postgresql cluster based on Stolon
MIT License
105 stars 39 forks source link

Cannot connect and proxies not running #12

Closed randy-girard closed 6 years ago

randy-girard commented 6 years ago

I just installed with:

helm install --name pg-ha-test .

this and see the following:

default       po/pg-ha-test-stolon-proxy-fc8c59589-2ksdf       0/1       Running   0          4m
default       po/pg-ha-test-stolon-proxy-fc8c59589-5htht       0/1       Running   0          4m
default       po/pg-ha-test-stolon-proxy-fc8c59589-dqnzt       0/1       Running   0          4m

It appears they are not ready?

Also I cannot connect to the keeper. How do I set up my connection string?

$ psql -h pg-ha-test-stolon-keeper.deis.minikube
psql: could not connect to server: Connection refused
    Is the server running on host "pg-ha-test-stolon-keeper.deis.minikube" (192.168.99.100) and accepting
    TCP/IP connections on port 5432?

From the kubernetes dashboard I see this for the proxy pods:

Readiness probe failed: dial tcp 172.17.0.7:5432: getsockopt: connection refused

I'm using dsnmasq on Mac:

cat /etc/resolver/minikube 
nameserver 127.0.0.1

Any help would be great. Thanks!

lwolf commented 6 years ago

Most likely you did not install etcd before installing the chart. (I can see now that it lacks instructions in the readme)

basically you need to install etcd, and set the location in the chart values

randy-girard commented 6 years ago

Yea, I just noticed that in the logs

etcd cluster is unavailable or misconfigured

I'll try that and see how it goes. Thanks!

randy-girard commented 6 years ago

I think I got it all up and running now but still not sure how to connect from locally.

# psql -h estranged-panther-stolon-keeper.minikube
psql: could not connect to server: Host is down
    Is the server running on host "estranged-panther-stolon-keeper.minikube" (192.168.99.100) and accepting
    TCP/IP connections on port 5432?
randy-girard commented 6 years ago

I got it figured out. Had to create a NodePort.

JWDobken commented 5 years ago

How should I install etcd? Just as simple as brew install etcd?

I get the same result:

$psql --host $(minikube ip) --port 30543 postgres -U postgres -W
psql: could not connect to server: Connection refused
        Is the server running on host "192.168.99.114" and accepting
        TCP/IP connections on port 30543?

While I created the NodePort with the following yml file:

apiVersion: v1
kind: Service
metadata:
  name: stolon-proxy-service
spec:
  type: NodePort
  ports:
    - port: 5432
      nodePort: 30543
  selector:
    component: release-name-stolon-proxy