CloudNativePG (CNPG) operator for PostgreSQL on Kubernetes. Use when deploying clusters, PgBouncer, S3/MinIO backups, WAL archiving, PITR, Prometheus monitoring, failover, or troubleshooting CNPG.
Ships in cloudnative-pg. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Kubernetes operator for PostgreSQL. Shared-nothing architecture: each instance has dedicated storage, managed directly by operator (not StatefulSet).
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo update
helm install cnpg cnpg/cloudnative-pg -n cnpg-system --create-namespace
kubectl -n cnpg-system wait --for=condition=ready pod -l app.kubernetes.io/name=cloudnative-pg --timeout=300s
Install kubectl plugin: curl -sSfL https://github.com/cloudnative-pg/cloudnative-pg/raw/main/hack/install-cnpg-plugin.sh | sudo sh -s -- -b /usr/local/bin
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: my-db
namespace: databases
spec:
instances: 1
storage:
size: 10Gi
storageClass: ceph-block
bootstrap:
initdb:
database: app
owner: app
Services created: my-db-rw (primary), my-db-ro (replicas), my-db-r (any readable).
Credentials in Secrets: my-db-app (app user), my-db-superuser (if enabled).
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: my-db
spec:
instances: 3
storage:
size: 20Gi
storageClass: ceph-block
postgresql:
parameters:
shared_buffers: "256MB"
effective_cache_size: "768MB"
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "1Gi"
enableSuperuserAccess: trueapp database owned by app userkubectl cnpg status my-db -n databases
kubectl get cluster my-db -n databases
kubectl get pods -l cnpg.io/clusterName=my-db -n databases -L role -o wide
# Port-forward
kubectl port-forward svc/my-db-rw 5432:5432 -n databases
# From within cluster
psql "host=my-db-rw.databases.svc dbname=app user=app"
references/cluster-examples.md - Detailed single + HA cluster manifestsreferences/backup-s3.md - Barman Cloud Plugin, S3/MinIO object store setupreferences/backup-schedule-wal.md - Scheduled backups, WAL archiving, retentionreferences/restore-pitr.md - Recovery bootstrap, PITR targetsreferences/pooler-pgbouncer.md - PgBouncer connection poolingreferences/monitoring.md - Prometheus metrics, PodMonitor, custom queriesreferences/roles-pgconfig.md - Declarative roles, PostgreSQL configurationreferences/kubectl-cnpg.md - Plugin commands referencereferences/operations.md - Failover, switchover, hibernate, maintenancereferences/troubleshooting.md - Diagnostics, common issuesconfig.yaml (opens in a new tab)references/backup-s3.md (opens in a new tab)references/backup-schedule-wal.md (opens in a new tab)references/cluster-examples.md (opens in a new tab)references/kubectl-cnpg.md (opens in a new tab)references/monitoring.md (opens in a new tab)references/operations.md (opens in a new tab)references/pooler-pgbouncer.md (opens in a new tab)references/restore-pitr.md (opens in a new tab)references/roles-pgconfig.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/cloudnative-pg:cloudnative-pgfrom cloudnative-pg
npx claudepluginhub kettleofketchup/kettleofskills --plugin cloudnative-pgOther plugins' skills for the same job