连接到 Crunchy Operator 的只读副本



在HA模式下运行Crunchy Operator postgres集群时,如何连接到该集群的读取副本?

我配置了两个instances和两个pgBouncer

k get svc -o wide看起来像这个

NAME                     TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE   SELECTOR
analytics-ha             ClusterIP   172.16.16.194   <none>        5432/TCP   63d   <none>
analytics-ha-config      ClusterIP   None            <none>        <none>     63d   <none>
analytics-pgbouncer      ClusterIP   172.16.24.181   <none>        5432/TCP   63d   postgres-operator.crunchydata.com/cluster=analytics,postgres-operator.crunchydata.com/role=pgbouncer
analytics-pods           ClusterIP   None            <none>        <none>     63d   postgres-operator.crunchydata.com/cluster=analytics
analytics-primary        ClusterIP   None            <none>        5432/TCP   63d   <none>

正如你所看到的,没有副本svc我可以连接。

我试图在同一个子网中创建一个Vm,并且能够从Vm访问具有相同用户名密码的读取副本。

最新更新