-
|
I'm trying to add a cnpg cluster to the list of databases I'm backing up, and I'm struggling to figure out what needs to happen. My cnpg-cluster is running in my k3s cluster. I am using Traefik as an ingress controller with the following: ---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: cnpg-cluster
namespace: cnpg-system
annotations:
kubernetes.io/ingress.class: traefik-local
spec:
entryPoints:
- postgres
tls:
passthrough: true
routes:
- match: HostSNI(`*`)
services:
- name: cnpg-cluster-rw
port: 5432This ingress route allows me to connect to the cnpg-cluster using PG Admin 4 using my superuser credentials for the cluster. I'm trying to use the db-backup container using the following settings: # CNPG
- DB09_TYPE=pgsql
- DB09_HOST=cnpg.local.domain.com # I've also tried using the Traefik IP directly (10.69.1.100).
- DB09_PORT=5432 # This is the port for the "postgres" Traefik entrypoint.
- DB09_NAME=ALL
- DB09_SPLIT=TRUE
- DB09_USER=superusername
- DB09_PASS=superuserpassword
- DB09_AUTH=postgres
- DB09_SKIP_AVAILABILITY_CHECK=true
- DB09_LOG_LEVEL=DEBUGBut these settings give me an error like: pg_dump: error: connection to server at "10.69.1.100", port 5432 failed: could not open certificate file "/root/.postgresql/postgresql.crt": Permission denied
connection to server at "10.69.1.100", port 5432 failed: expected authentication request from server, but received HI'm sure this probably has to do with my IngressRouteTCP settings, but I'm running out of things to try. Any suggestions would be welcome. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I think I answered my own question. I think the issue was with the ---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: cnpg-cluster
namespace: cnpg-system
annotations:
kubernetes.io/ingress.class: traefik-local
spec:
entryPoints:
- postgres
routes:
- match: HostSNI(`*`)
services:
- name: cnpg-cluster-rw
port: 5432And now I get the following error: pg_dump: error: aborting because of server version mismatch
pg_dump: detail: server version: 18.1 (Debian 18.1-1.pgdg13+2); pg_dump version: 17.5And the db-backup image doesn't support postgres 18 yet, so that makes sense. |
Beta Was this translation helpful? Give feedback.
I think I answered my own question. I think the issue was with the
tls.passthrough: truesetting on the IngressRouteTCP. I changed that definition to this:And now I get the following error:
pg_dump: error: aborting because of server version mismatch pg_dump: detail: server version: 18.1 (Debian 18.1-1.pgdg13+2); pg_dump version: 17.5And the db-backup image doesn't support po…