Install AlloyDB Omni

Install and run AlloyDB Omni on Google Distributed Cloud (software only) for bare metal clusters.

Overview

Google Distributed Cloud for bare metal completed partner qualification for AlloyDB Omni (starting with AlloyDB Omni Operator version 1.7.0).

AlloyDB Omni is a downloadable database software package that:

  • Lets you deploy a streamlined version of AlloyDB for PostgreSQL.
  • Offers full PostgreSQL compatibility.
  • Provides high throughput on transactional workload.
  • Offers columnar engine acceleration for analytical workloads.
  • Offers built-in support for generative AI and vector search workloads with AlloyDB AI.

Deploy and manage AlloyDB Omni on your bare metal clusters using the AlloyDB Omni Kubernetes Operator.

Before you begin

Before you install AlloyDB Omni, you must have the following:

  • A Google Distributed Cloud bare metal cluster running Kubernetes version 1.21 or later.
  • The kubectl command-line tool configured to communicate with your cluster.
  • The helm package manager (version 3 or later) installed on your admin workstation.
  • A default StorageClass configured on your bare metal cluster for dynamic volume provisioning. For more information, see Storage overview.
  • Nodes in your cluster that meet the minimum resource requirements for AlloyDB Omni:
    • At least 2 CPUs per database instance.
    • At least 8 GB of RAM per CPU (for example, 16 GB for 2 CPUs).
    • Linux kernel 4.18 or later with control group (cgroup) v2 enabled.

Install cert-manager

The AlloyDB Omni Operator requires cert-manager to manage TLS certificates for its admission webhooks.

  1. If cert-manager isn't already installed on your cluster, install it using Helm: sh helm repo add jetstack https://charts.jetstack.io helm repo update helm install cert-manager jetstack/cert-manager \ --namespace cert-manager \ --create-namespace \ --version v1.16.0 \ --set crds.enabled=true \ --kubeconfig KUBECONFIG

  2. Replace KUBECONFIG with the path of your cluster kubeconfig file.

  3. Verify that the cert-manager Pods are running: sh kubectl get pods -n cert-manager --kubeconfig KUBECONFIG

    Install the AlloyDB Omni Operator

To install the AlloyDB Omni Kubernetes Operator from the OCI registry using Helm, do the following:

  1. Install the operator Helm chart:

    helm install alloydbomni-operator oci://gcr.io/alloydb-omni/alloydbomni-operator \
        --version OPERATOR_VERSION \
        --create-namespace \
        --namespace alloydb-omni-system \
        $(helm install --help | grep -q -- '--rollback-on-failure' && echo '--rollback-on-failure' || echo '--atomic') \
        --timeout 5m \
        --kubeconfig KUBECONFIG
    

    Replace the following:

    • OPERATOR_VERSION: the version of the AlloyDB Omni Operator to install (for example, 1.8.0 or later).
    • KUBECONFIG: the path of your cluster kubeconfig file.
  2. Verify that the operator Pod is running:

    kubectl get pods -n alloydb-omni-system --kubeconfig KUBECONFIG
    

    The output is similar to the following:

    NAME                                        READY   STATUS    RESTARTS   AGE
    fleet-controller-manager-796c698cd7-x2vsr   1/1     Running   0          22h
    local-controller-manager-76f6c98446-rzpsc   1/1     Running   0          22h
    

Create an AlloyDB Omni cluster

After the operator runs, create an AlloyDB Omni database cluster by creating a password Secret and applying a DBCluster custom resource.

  1. Create a namespace for your database workloads:

    kubectl create namespace my-db-ns --kubeconfig KUBECONFIG
    
  2. Create a Kubernetes Secret containing the database administrator login password for the default postgres user:

    kubectl create secret generic db-pw-my-db-cluster \
        --namespace my-db-ns \
        --from-literal=my-db-cluster=PASSWORD \
        --kubeconfig KUBECONFIG
    

    Replace PASSWORD with a secure password.

  3. Create a manifest named db-cluster.yaml:

    apiVersion: alloydbomni.dbadmin.goog/v1
    kind: DBCluster
    metadata:
      name: my-db-cluster
      namespace: my-db-ns
    spec:
      databaseVersion: "18.3.0"
      primarySpec:
        adminUser:
          passwordRef:
            name: db-pw-my-db-cluster
        resources:
          cpu: 2
          memory: 16Gi
          disks:
          - name: DataDisk
            size: 20Gi
    
  4. Apply the manifest:

    kubectl apply -f db-cluster.yaml --kubeconfig KUBECONFIG
    
  5. Verify that the database cluster reaches the Ready state:

    kubectl get dbclusters -n my-db-ns --kubeconfig KUBECONFIG
    

    The output is similar to the following:

    NAME            PRIMARY             PRIMARYSTATUS   STANDBY   STANDBYSTATUS   STATUS
    my-db-cluster   my-db-cluster-0     Ready                                     Ready
    

What's next