cnpg

Automate CNPG Postgres cluster provisioning on Kubernetes via GitOps.

5|Updated May 2, 2026
One-click install
npx skills add https://github.com/vanducng/skills --skill cnpg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cnpg
Source: https://github.com/vanducng/skills/tree/main/skills/cnpg
Command: npx skills add https://github.com/vanducng/skills --skill cnpg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provision CNPG Postgres clusters on Kubernetes using GitOps to achieve repeatable, auditable deployments.

Core Features & Use Cases

  • GitOps-powered CNPG deployments: declarative cluster creation, upgrades, backups, and PITR.
  • Cross-environment support: managed cloud (GKE + Workload Identity) and self-hosted (K3s/bare-metal) with vector extension and network-policy guidance.
  • Use Case: clone prod to dev, enable pgvector, wire backups, and enforce default-deny policies with structured references.

Quick Start

Create a new CNPG cluster by applying the manifests in this skill to your Kubernetes cluster.

Frequently Asked Questions about cnpg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Postgres cluster on Kubernetes using GitOps?

You can deploy a Postgres cluster on Kubernetes using GitOps by applying declarative manifests through Flux and Kustomize. This approach enables repeatable, auditable cluster provisioning, upgrades, and backups without manual kubectl commands.

Can I use CloudNativePG (CNPG) with managed Kubernetes like GKE?

Yes, CloudNativePG works with managed Kubernetes environments like GKE using Workload Identity, as well as self-hosted clusters like K3s. It supports configuring backups, Point-in-Time Recovery (PITR), and pgvector across these different infrastructure platforms.

What do I need to set up before provisioning a CNPG Postgres cluster?

Before provisioning a CNPG Postgres cluster, you need Flux and Kustomize for GitOps deployment, SOPS-encrypted secrets for sensitive data, and proper storage configurations. These prerequisites ensure secure, declarative cluster creation and management.

Does CNPG support pgvector and network policies on Kubernetes?

Yes, CNPG supports enabling the pgvector extension for vector operations and provides NetworkPolicy guidance to enforce default-deny security policies. This ensures your Postgres cluster is both AI-ready and secure within your Kubernetes environment.

How do I clone a production Postgres cluster to a dev environment?

You can clone a production Postgres cluster to a dev environment using declarative GitOps manifests. This process is supported by CloudNativePG configurations, allowing you to replicate data while managing backups and Point-in-Time Recovery (PITR) settings.

What is the best way to configure backups and PITR for Postgres on Kubernetes?

The best way to configure backups and PITR for Postgres on Kubernetes is through CloudNativePG's GitOps manifests. It supports both inline and plugin-based backup configurations, ensuring reliable data recovery and auditable deployment across managed or self-hosted clusters.