Die Schritte, die Sie zum Upgraden von AlloyDB Omni in Kubernetes ausführen, hängen von der Version von AlloyDB Omni ab, die Sie ausführen, und von der Version, auf die Sie upgraden.
Aktuelle Versionsnummern ermitteln
Kubernetes
Führen Sie den folgenden Befehl aus, um die Version von AlloyDB Omni zu prüfen, die von Ihrem Datenbankcluster verwendet wird:
DB_CLUSTER_NAME: der Name Ihres Datenbankclusters. Das ist derselbe Datenbankclustername, den Sie beim Erstellen des Clusters angegeben haben.
NAMESPACE: Der Kubernetes-Namespace Ihres Datenbankclusters.
Wenn Sie Version 1.0.0 oder höher des AlloyDB Omni-Operators ausführen, wird mit diesem Befehl die Version von AlloyDB Omni ausgegeben, die von Ihrem Datenbankcluster verwendet wird.
Führen Sie den folgenden Befehl aus, um die Version des AlloyDB Omni-Operators zu prüfen, der in Ihrem Kubernetes-Cluster installiert ist:
Wenn Sie Version 1.0.0 oder höher des AlloyDB Omni-Operators ausführen, wird mit diesem Befehl die Versionsnummer des AlloyDB Omni-Operators ausgegeben, der in Ihrem Kubernetes-Cluster ausgeführt wird.
Wenn Sie eine Version von AlloyDB Omni Operator 1.0.0 oder höher ausführen, hängen die nächsten Schritte von der Version von AlloyDB Omni ab, auf die Sie ein Upgrade durchführen möchten.
Dazu müssen Sie die Versionsnummer von AlloyDB Omni kennen.
Die AlloyDB Omni-Versionsnummer hat die folgenden Komponenten:
Die Hauptversionsnummer der PostgreSQL-Kompatibilität
Die Nebenversionsnummer der PostgreSQL-Kompatibilität
Die Patchversionsnummer dieses AlloyDB Omni-Release
Beispiel: AlloyDB Omni-Version 15.5.5 ist die Patchversion 5 von AlloyDB Omni, die PostgreSQL-Version 15.5 unterstützt.
Wenn Sie auf eine Version von AlloyDB Omni aktualisieren möchten, die eine neuere Version von PostgreSQL unterstützt, müssen Sie den AlloyDB Omni-Operator zusammen mit Ihrem Datenbankcluster aktualisieren. Jede Gruppe von AlloyDB Omni-Releases, die eine bestimmte PostgreSQL-Nebenversion unterstützen, hat eine eigene AlloyDB Omni Operator-Versionsnummer. Diese finden Sie in den Versionshinweisen für die AlloyDB Omni-Version.
Wenn Sie nur auf eine neuere Patchversion von AlloyDB Omni aktualisieren möchten, können Sie nur Ihren Datenbankcluster aktualisieren. Ein Upgrade des AlloyDB Omni-Operators selbst ist nicht erforderlich.
Nachdem Sie das Upgrade Ihres AlloyDB Omni-Operators abgeschlossen haben, folgen Sie der Anleitung unter In-Place-Upgrade durchführen, um einen neuen Datenbankcluster zu erstellen.
Wenn Ihr AlloyDB Omni-Cluster mit AlloyDB Omni Operator 1.0.0 erstellt wurde, fügen Sie dem Manifest das Feld controlPlaneAgentsVersion hinzu und legen Sie es auf 1.1.0 fest, bevor Sie das Cluster auf Version 15.5.5 aktualisieren. Andernfalls wird der folgende Fehler angezeigt:
admission webhook "vdbcluster.alloydbomni.dbadmin.goog" denied the request: unsupported database version 15.5.5 and/or control plane agents version 1.0.0
Ein Beispielmanifest mit dem Feld controlPlaneAgentsVersion sieht so aus:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[[["\u003cp\u003eThis page provides instructions for upgrading the AlloyDB Omni Operator from version 1.0.0 to 1.1.0 in a Kubernetes environment.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading involves first determining the current versions of both the AlloyDB Omni used by your database cluster and the AlloyDB Omni Operator running on your Kubernetes cluster.\u003c/p\u003e\n"],["\u003cp\u003eIf upgrading to a newer PostgreSQL version, the AlloyDB Omni Operator must be upgraded alongside the database cluster; otherwise, only the database cluster needs to be upgraded for patch version updates.\u003c/p\u003e\n"],["\u003cp\u003eThe upgrade process for the AlloyDB Omni Operator includes defining environment variables, downloading the latest operator, applying custom resource definitions, and upgrading the Helm chart.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading to version 1.1.0 of the AlloyDB Omni Operator will cause a brief interruption to the database cluster, and requires setting the \u003ccode\u003econtrolPlaneAgentsVersion\u003c/code\u003e field in the manifest file if the cluster was created with version 1.0.0.\u003c/p\u003e\n"]]],[],null,["# Migrate to the latest version of the AlloyDB Omni Kubernetes Operator\n\nSelect a documentation version: 15.5.5keyboard_arrow_down\n\n- [15.7.0](/alloydb/omni/15.7.0/docs/migrate-to-latest-version-kubernetes)\n- [15.5.5](/alloydb/omni/15.5.5/docs/migrate-to-latest-version-kubernetes)\n- [15.5.4](/alloydb/omni/15.5.4/docs/migrate-to-latest-version-kubernetes)\n\n\u003cbr /\u003e\n\nThis page covers instructions for upgrading from version 1.0.0 to version 1.1.0 of the AlloyDB Omni Operator.\n\n\u003cbr /\u003e\n\nThe steps that you take to upgrade AlloyDB Omni in Kubernetes depend upon the version of AlloyDB Omni that you run, and the version that you upgrade to.\n\nDetermine your current version numbers\n--------------------------------------\n\n### Kubernetes\n\nTo check the version of AlloyDB Omni used by your database cluster,\nrun this command: \n\n kubectl get dbclusters.alloydbomni.dbadmin.goog \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e -o jsonpath='{.status.primary.currentDatabaseVersion}'\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e: the name of your database\n cluster. It's the same database cluster name that you declared when [you created\n it](/alloydb/omni/15.5.2/docs/deploy-kubernetes#create).\n\n- \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e: the Kubernetes namespace of your database cluster.\n\nIf you run version 1.0.0 or later of the AlloyDB Omni Operator, then this command\nprints the version of AlloyDB Omni used by your\ndatabase cluster.\n\nTo check the version of the AlloyDB Omni Operator installed on your\nKubernetes cluster, run this command: \n\n kubectl get dbclusters.alloydbomni.dbadmin.goog \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e -o jsonpath='{.status.primary.currentControlPlaneAgentsVersion}'\n\nIf you run version 1.0.0 or later of the AlloyDB Omni Operator, then this command\nprints the version number of the AlloyDB Omni Operator\nrunning on your Kubernetes cluster.\n\nIf you run a version of AlloyDB Omni Operator earlier than\n1.0.0, follow the instructions in [Upgrade from a pre-1.0.0\nAlloyDB Omni Operator](/alloydb/omni/15.5.2/docs/manage#older-operator).\n\nOtherwise, continue to the [Check your target version numbers](#check-target-version) section.\n\nCheck your target version numbers\n---------------------------------\n\n### Kubernetes\n\nIf you run a version of AlloyDB Omni Operator 1.0.0 or later, then your\nnext steps depend upon the version of AlloyDB Omni that you want to upgrade to.\nThis, in turn, requires understanding of the AlloyDB Omni version number.\n\nThe AlloyDB Omni version number has the following components:\n\n- The major version number of its PostgreSQL compatibility\n- The minor version number of its PostgreSQL compatibility\n- The patch version number of this AlloyDB Omni release\n\nFor example, AlloyDB Omni version 15.5.5 is patch version 5 of the AlloyDB Omni that supports PostgreSQL version 15.5.\n\nIf you want to upgrade to a version of AlloyDB Omni that supports a newer\nversion of PostgreSQL, then you must upgrade the AlloyDB Omni Operator\nitself, alongside your database cluster. Each set of AlloyDB Omni\nreleases that support a particular PostgreSQL minor version has its own\nAlloyDB Omni Operator version number, which you can find\nin [the release note](/alloydb/docs/release-notes) for the AlloyDB Omni version.\n\nIf you want to upgrade only to a newer patch version of AlloyDB Omni, then you can [upgrade](/alloydb/omni/15.5.5/docs/migrate-to-latest-version) only your database cluster, with no need to\nupgrade the AlloyDB Omni Operator itself.\n\nOtherwise, continue to the [Upgrade the AlloyDB Omni Operator](#upgrade-operator) section.\n\nUpgrade the AlloyDB Omni Operator\n---------------------------------\n\n### Kubernetes\n\nTo upgrade the AlloyDB Omni Operator, follow these steps:\n\n1. Define the environment variables:\n\n export GCS_BUCKET=alloydb-omni-operator\n export OPERATOR_VERSION=\u003cvar translate=\"no\"\u003eOPERATOR_VERSION\u003c/var\u003e\n export HELM_PATH=$OPERATOR_VERSION/alloydbomni-operator-$OPERATOR_VERSION.tgz\n\n Replace \u003cvar translate=\"no\"\u003eOPERATOR_VERSION\u003c/var\u003e with the version of the\n AlloyDB Omni Operator that you are upgrading to---for example,\n `1.1.0`.\n2. Download the latest AlloyDB Omni Operator:\n\n gcloud storage cp -r gs://$GCS_BUCKET/$HELM_PATH ./\n tar -xvzf alloydbomni-operator-${OPERATOR_VERSION}.tgz\n\n3. Apply the latest AlloyDB Omni Operator custom resource\n definitions:\n\n kubectl apply -f alloydbomni-operator/crds\n\n4. Upgrade the AlloyDB Omni Operator Helm chart:\n\n helm upgrade alloydbomni-operator alloydbomni-operator-${OPERATOR_VERSION}.tgz \\\n --namespace alloydb-omni-system \\\n --atomic \\\n --timeout 5m\n\nAfter completing the upgrade of your AlloyDB Omni Operator, follow the instructions in [Perform an in-place upgrade](/alloydb/omni/15.5.5/docs/migrate-to-latest-version#perform-in-place-upgrade) to create a new database cluster.\n\nIf your AlloyDB Omni cluster was created with AlloyDB Omni Operator 1.0.0, then add the `controlPlaneAgentsVersion` field to the manifest and set it to `1.1.0` before upgrading the cluster to version 15.5.5. Otherwise, the following error displays: \n\n admission webhook \"vdbcluster.alloydbomni.dbadmin.goog\" denied the request: unsupported database version 15.5.5 and/or control plane agents version 1.0.0\n\nA sample manifest with the `controlPlaneAgentsVersion` field looks as follows: \n\n```html\napiVersion: alloydbomni.dbadmin.goog/v1\nkind: DBCluster\nmetadata:\n name: DB_CLUSTER_NAME\nspec:\n databaseVersion: \"15.5.5\"\n controlPlaneAgentsVersion: \"1.1.0\"\n...\n```\n| **Note:** Upgrading to version 1.1.0 of the AlloyDB Omni Operator results in a brief interruption to all database clusters. No data loss is expected."]]