diff --git a/docs/content/usage/integrations/.pages b/docs/content/usage/integrations/.pages index 1da4d15d4..b02ae354a 100644 --- a/docs/content/usage/integrations/.pages +++ b/docs/content/usage/integrations/.pages @@ -1,4 +1,5 @@ nav: - cert-manager.md - crossplane.md + - cloudnativepg.md - kro.md diff --git a/docs/content/usage/integrations/cloudnativepg.md b/docs/content/usage/integrations/cloudnativepg.md new file mode 100644 index 000000000..b756ce921 --- /dev/null +++ b/docs/content/usage/integrations/cloudnativepg.md @@ -0,0 +1,382 @@ +--- +title: CloudNativePG +description: | + Guide on integrating kube-bind with CloudNativePG for automated Postgres database management. +weight: 30 +--- + +# CloudNativePG Integration + +This document shows how the [CloudNativePG](https://cloudnative-pg.io/) Postgres database operator +can be integrated and provided using kube-bind. + +## Setup + +The following sections will guide you through the one-time setup that is required for providing +Postgres databases using CloudNativePG and kube-bind. + +### Install CloudNativePG + +Install CloudNativePG in your Kubernetes cluster, where kube-bind backend is running, if you +haven't already. Follow the [official installation guide](https://cloudnative-pg.io/docs/1.28/installation_upgrade) +in the CloudNativePG documentation. In its simplest form, the installation consists of applying this +manifest: + +```bash +kubectl apply \ + --server-side \ + --filename https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.28/releases/cnpg-1.28.0.yaml +``` + +### Export the Cluster CRD + +To export the `Cluster` CRD in the provider cluster, add the kube-bind export label to it: + +```bash +kubectl label crd clusters.postgresql.cnpg.io kube-bind.io/exported=true --overwrite +``` + +### Create a APIServiceExportTemplate + +It's now time to configure kube-bind to export the `clusters` resource. To do so, create a +kube-bind `APIServiceExportTemplate` in the provider cluster like this one: + +```yaml +kubectl apply -f - <