Creating and Managing a Bridge Postgres Cluster

Overview

The CrunchyBridgeCluster API introduces a Kubernetes-native method for provisioning Crunchy Bridge clusters with Crunchy Postgres for Kubernetes (CPK). This integration allows you to use familiar Kubernetes tools such as kubectl, kustomize, ArgoCD, and more, streamlining the provisioning process for Crunchy Bridge clusters.

A key distinction of the CrunchyBridgeCluster API, compared to the PostgresCluster API, is that Crunchy Bridge is fully managed and takes care of all PostgreSQL workloads. As a result, you won't see running Pods as you would with PostgresClusters, rendering traditional kubectl commands for pod monitoring less relevant.

To ensure you maintain clear visibility into your Crunchy Bridge clusters, the API emphasizes providing detailed status and condition information within the CrunchyBridgeCluster custom resource. This allows for comprehensive monitoring and management through Kubernetes-native tools.

Getting Started

Using the CrunchyBridgeCluster API is straightforward and involves a few key steps:

  1. Setting up your Crunchy Bridge account:
  • Account: You will need a Crunchy Bridge account to get started.
  • Teams: You may want to create a team for collaborating with others. You will need to know either your personal or group team id. You can find the team id in the URL after selecting the team that you wish to use, or via a curl to the Crunchy Bridge API.
  • Payment: You will need an active payment method. This can be created from My Account > Billing > Invoices. Crunchy Bridge bills prorated fees for database services, prorated down to the second like other cloud resources.
  • API: You will need to create an API key.
  • Docs: See the Crunchy Bridge documentation to understand the service and features.
  1. Install the Operator:

    If you do not have Crunchy Postgres for Kubernetes running, simply follow the standard installation process for CPK to set up the operator in your Kubernetes cluster.

  2. Create a Kubernetes Secret:

    You will need to create a secret that contains your API key and Team ID from Crunchy Bridge. Ensure this Secret is in the same namespace where CPK is installed. You can see an example of a secret here:

    kubectl create secret generic crunchy-bridge-api-key \
    -n postgres-operator \
    --from-literal=key=<your Crunchy Bridge API key here> \
    --from-literal=team=<your Crunchy Bridge Team ID here>
    
  3. Provision Crunchy Bridge Clusters:

    With the Secret in place, you can begin provisioning Crunchy Bridge clusters using the CrunchyBridgeCluster API. The Postgres workload management is fully handled by Crunchy Bridge, simplifying your Kubernetes database operations.

Configuring a Crunchy Bridge cluster

When you are ready to provision a Crunchy Bridge cluster, the following spec can serve as a starting point. Each option in the spec should be reviewed and customized to fit your specific requirements. You can pre-plan machine sizing, pricing, and regions from our Crunchy Bridge cost calculator.

apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: CrunchyBridgeCluster
metadata:
  name: my-test-cluster
  namespace: postgres-operator
spec:
  isHa: false
  clusterName: my-test-bridge-cluster
  plan: standard-4
  majorVersion: 16
  provider: aws
  region: us-west-2
  secret: crunchy-bridge-api-key
  storage: 10Gi

Configuration notes:

  • High Availability: Set isHa to true if high availability is required for your workload.
  • Cluster Plan: Choose a plan (standard-4 in this example) that matches your performance needs.
  • Postgres Version: Specify the major version of Postgres that you want to provision.
  • Provider and Region: Select the cloud provider and region that best suits your latency and compliance requirements.
  • Storage: Select the amount of storage that you require in 1 GB increments.
  • Secrets Management: Ensure the secret is correctly configured with your API key and team id.

Updates to your Crunchy Bridge provision

Changes to the Crunchy Bridge cluster can be made by editing the spec in your manifest and re-applying it using kubectl. This will send a resize or update request to the Crunchy Bridge platform. Crunchy Bridge will stage a new machine and failover to the updated machine during your selected maintenance window. Note that provider and region cannot be changed currently. You can also delete any Crunchy Bridge cluster by deleting the crunchybridgecluster manifest from the kubernetes cluster using kubectl.

Getting Crunchy Bridge support

We are here to help you make the most out of Crunchy Bridge. Support tickets can be generated from inside your Crunchy Bridge dashboard.

The full CRD documentation for The CrunchyBridgeCluster API is located here.