Percona Operator for PostgreSQL - Initial troubleshooting (original) (raw)

Percona Operator for PostgreSQL uses Custom Resources to manage options for the various components of the cluster.

The first thing you can check for the Custom Resource is to query it with kubectl get command:

Expected output

NAME ENDPOINT STATUS POSTGRES PGBOUNCER AGE cluster1 cluster1-pgbouncer.default.svc ready 3 3 30m

The Custom Resource should have Ready status.

Note

You can check which Percona’s Custom Resources are present and get some information about them as follows:

$ kubectl api-resources | grep -i percona

Expected output

perconapgbackups pg-backup pgv2.percona.com/v2 true PerconaPGBackup perconapgclusters pg pgv2.percona.com/v2 true PerconaPGCluster perconapgrestores pg-restore pgv2.percona.com/v2 true PerconaPGRestore

Check the Pods

If Custom Resource is not getting Ready status, it makes sense to check individual Pods. You can do it as follows:

Expected output

NAME READY STATUS RESTARTS AGE cluster1-backup-4vwt-p5d9j 0/1 Completed 0 97m cluster1-instance1-b5mr-0 4/4 Running 0 99m cluster1-instance1-b8p7-0 4/4 Running 0 99m cluster1-instance1-w7q2-0 4/4 Running 0 99m cluster1-pgbouncer-79bbf55c45-62xlk 2/2 Running 0 99m cluster1-pgbouncer-79bbf55c45-9g4cb 2/2 Running 0 99m cluster1-pgbouncer-79bbf55c45-9nrmd 2/2 Running 0 99m cluster1-repo-host-0 2/2 Running 0 99m percona-postgresql-operator-79cd8586f5-2qzcs 1/1 Running 0 120m

The above command provides the following insights:

You can find more details about a specific Pod using thekubectl describe pods <pod-name> command.

$ $ kubectl describe pods cluster1-instance1-b5mr-0

Expected output

... Name: cluster1-instance1-b5mr-0 Namespace: default ... Controlled By: StatefulSet/cluster1-instance1-b5mr Init Containers: postgres-startup: ... Containers: database: ... pgbackrest: ... Restart Count: 0 Liveness: http-get https://:8008/liveness delay=3s timeout=5s period=10s #success=1 #failure=3 Readiness: http-get https://:8008/readiness delay=3s timeout=5s period=10s #success=1 #failure=3 Environment: ... Mounts: ... Volumes: ... Events: ...

This gives a lot of information about containers, resources, container status and also events. So, describe output should be checked to see any abnormalities.


Last update: 2025-04-07