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
kubectlcommand-line tool configured to communicate with your cluster. - The
helmpackage 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.
If
cert-managerisn'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 KUBECONFIGReplace
KUBECONFIGwith the path of your cluster kubeconfig file.Verify that the
cert-managerPods are running:sh kubectl get pods -n cert-manager --kubeconfig KUBECONFIGInstall the AlloyDB Omni Operator
To install the AlloyDB Omni Kubernetes Operator from the OCI registry using Helm, do the following:
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 KUBECONFIGReplace the following:
OPERATOR_VERSION: the version of the AlloyDB Omni Operator to install (for example,1.8.0or later).KUBECONFIG: the path of your cluster kubeconfig file.
Verify that the operator Pod is running:
kubectl get pods -n alloydb-omni-system --kubeconfig KUBECONFIGThe 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.
Create a namespace for your database workloads:
kubectl create namespace my-db-ns --kubeconfig KUBECONFIGCreate a Kubernetes Secret containing the database administrator login password for the default
postgresuser:kubectl create secret generic db-pw-my-db-cluster \ --namespace my-db-ns \ --from-literal=my-db-cluster=PASSWORD \ --kubeconfig KUBECONFIGReplace
PASSWORDwith a secure password.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: 20GiApply the manifest:
kubectl apply -f db-cluster.yaml --kubeconfig KUBECONFIGVerify that the database cluster reaches the
Readystate:kubectl get dbclusters -n my-db-ns --kubeconfig KUBECONFIGThe output is similar to the following:
NAME PRIMARY PRIMARYSTATUS STANDBY STANDBYSTATUS STATUS my-db-cluster my-db-cluster-0 Ready Ready
What's next
- Learn more about AlloyDB Omni on Kubernetes.
- Learn how to run and connect to AlloyDB Omni.
- Learn how to configure High availability for Kubernetes.
- Learn how to Serve third-party LLMs on bare metal and integrate with vector databases.
- Learn how to Run AlloyDB Omni in production