Essential diagnostic commands
Run these commands first whenever something is wrong with a cluster. Replace<namespace> and <cluster-name> with your values.
Cluster stuck in “Creating” state
A cluster that never reaches a running state usually has one of three root causes: an image that cannot be pulled, a PVC that cannot be provisioned, or a pod that fails its readiness probe. Step 1 — Check pod status.Pending, Init:Error, or CrashLoopBackOff state.
Step 2 — Describe the stuck pod.
Events section at the bottom. Common findings:
Step 3 — Check the image pull secret.
Backup job failing
pgBackRest backup jobs fail for three main reasons: incorrect repository configuration (wrong bucket name, path, or region), missing or incorrect cloud credentials, and network connectivity problems between the backup pod and the object storage endpoint. Step 1 — Find the failing backup pod.ERROR or FATAL.
Step 3 — Check the Secret containing cloud credentials.
s3-key, s3-key-secret, and (if applicable) s3-endpoint are present and correctly base64-encoded.
Step 4 — Verify network access from inside the backup pod.
403 Forbidden response means the bucket exists but the credentials are wrong. A connection timeout or DNS failure points to a network policy or endpoint misconfiguration.
High availability failover not happening
Patroni manages failover. If a primary pod fails and Patroni does not elect a new leader within 30–60 seconds, investigate the Patroni state directly. Step 1 — Check Patroni’s view of the cluster.Role: Leader and the rest as Role: Replica with State: running. If all members show State: stopped or Role: standby leader, Patroni has lost quorum or cannot reach the DCS.
Step 2 — Check for network policy blocking DCS traffic.
Patroni uses Kubernetes API endpoints (not a separate DCS in PGO) for distributed consensus. If the instance pods cannot reach the Kubernetes API server, failover will stall. Test from inside a pod:
required anti-affinity rules in spec.instances[].affinity. See the high availability guide for examples.
Cannot connect to PostgreSQL
Connection failures usually stem from one of four causes: the service endpoint is not resolving, TLS certificate validation is failing, credentials are wrong, or a network policy is blocking the connection. Step 1 — Verify the service exists and has an endpoint.Endpoints object shows <none>, the primary pod is not ready or its labels do not match the service selector.
Step 2 — Retrieve the connection Secret.
PGO stores connection credentials in a Secret named <cluster-name>-pguser-<username>:
host, port, dbname, user, password, and the TLS certificate fields.
Step 3 — Test connectivity from inside the cluster.
sslmode=require but not supplying the cluster CA, the connection will fail certificate verification. Retrieve the CA from the Secret or disable host verification temporarily with sslmode=require (not sslmode=verify-full) to isolate the issue.
See the TLS guide for how to manage and rotate certificates.
OOMKilled pods
A pod withOOMKilled in its last state has exceeded its memory limit. For PostgreSQL pods, this usually means shared_buffers, work_mem, or other memory parameters are set too high for the pod’s limit.
Step 1 — Identify which container was killed.
spec.instances[].resources or reduce PostgreSQL memory parameters in spec.patroni.dynamicConfiguration:
shared_buffers to 25% of the container memory limit and work_mem conservatively — it is allocated per sort operation per connection, so high concurrency multiplies the footprint.
PersistentVolumeClaim stuck in Pending state
A PVC that stays inPending means the Kubernetes volume provisioner cannot satisfy the storage request.
Step 1 — Describe the PVC.
ProvisioningFailed events. Common causes:
Step 2 — Verify the StorageClass exists and is the default.
(default) is used when spec.instances[].dataVolumeClaimSpec.storageClassName is omitted. If no default exists, you must specify one explicitly.
Step 3 — Check available capacity.
For local-path or hostPath provisioners, verify that the target node has sufficient free disk space. For cloud provisioners, confirm you have not hit a regional volume quota.
Related pages
FAQ
Answers to common questions about PGO setup and operations.
High availability guide
Configure Patroni, anti-affinity, and synchronous replication.
Backups guide
Set up and validate pgBackRest backup repositories.
TLS guide
Manage certificates and troubleshoot TLS connection failures.