<p>Has anyone used the kubedb operator before? <a href="https://kubedb.com/docs/0.9.0/welcome/" rel="nofollow noreferrer">https://kubedb.com/docs/0.9.0/welcome/</a></p>

<p>I've gotten a postgres instance bootstrapped and now im trying to do a snapshot to s3 but cant seem to get it working</p>

<p><code>Waiting... database is not ready yet</code></p>

<p>The db is up and accepting connections:</p>

<pre><code>$ kubectl exec -it db-0 -n ${namespace} bash
  bash-4.3# pg_isready
  /var/run/postgresql:5432 - accepting connections
</code></pre>

<p>The db pod is running at :</p>

<p><code>db-0                       1/1       Running   0          37m</code></p>

<p>Which is accessible in pgadmin via the server name <code>db.${namespace}</code></p>

<p>Here's my snapshot object spec:</p>

<pre><code>---
apiVersion: kubedb.com/v1alpha1
kind: Snapshot
metadata:
  name: db-snapshot
  namespace: ${namespace}
  labels:
    kubedb.com/kind: Postgres
spec:
  databaseName: db
  storageSecretName: s3-creds
  s3:
    endpoint: 's3.amazonaws.com'
    bucket: ${bucket}
</code></pre>

<p>If anyone can point out where im going wrong that would be great!</p>

Amar Sattaur
<pre><code>#while ! nc "$DB_HOST" "$DB_PORT" -w 30 &gt;/dev/null; do
#  echo "Waiting... database is not ready yet"
#  sleep 5
#done
</code></pre>

<p>This nc command wasnt connecting to the db host for some reason.
The container could psql into it using the db name so I commented it out and it worked like a charm.</p>

<p>Guess there's some issue with the nc binary that's bundled in this container.</p>
