Langkah-langkah yang Anda lakukan untuk mengupgrade AlloyDB Omni di Kubernetes bergantung pada versi AlloyDB Omni yang Anda jalankan, dan versi yang Anda upgrade.
Menentukan nomor versi saat ini
Kubernetes
Untuk memeriksa versi AlloyDB Omni yang digunakan oleh cluster database Anda,
jalankan perintah ini:
DB_CLUSTER_NAME: nama cluster database. Nama cluster database yang sama dengan yang Anda deklarasikan saat Anda membuatnya.
NAMESPACE: namespace Kubernetes cluster database Anda.
Jika Anda menjalankan Operator AlloyDB Omni versi 1.0.0 atau yang lebih baru, perintah ini akan mencetak versi AlloyDB Omni yang digunakan oleh cluster database Anda.
Untuk memeriksa versi Operator AlloyDB Omni yang diinstal di cluster Kubernetes Anda, jalankan perintah ini:
Jika Anda menjalankan Operator AlloyDB Omni versi 1.0.0 atau yang lebih baru, perintah ini akan mencetak nomor versi Operator AlloyDB Omni yang berjalan di cluster Kubernetes Anda.
Jika Anda menjalankan versi AlloyDB Omni Operator 1.0.0 atau yang lebih baru, langkah berikutnya bergantung pada versi AlloyDB Omni yang ingin Anda upgrade.
Selanjutnya, hal ini memerlukan pemahaman tentang nomor versi AlloyDB Omni.
Nomor versi AlloyDB Omni memiliki komponen berikut:
Nomor versi utama kompatibilitas PostgreSQL-nya
Nomor versi minor kompatibilitas PostgreSQL-nya
Nomor versi patch rilis AlloyDB Omni ini
Misalnya, AlloyDB Omni versi 15.5.5 adalah versi patch 5 dari AlloyDB Omni yang mendukung PostgreSQL versi 15.5.
Jika Anda ingin mengupgrade ke versi AlloyDB Omni yang mendukung versi PostgreSQL yang lebih baru, Anda harus mengupgrade Operator AlloyDB Omni itu sendiri, bersama dengan cluster database Anda. Setiap set rilis AlloyDB Omni yang mendukung versi minor PostgreSQL tertentu memiliki nomor versi Operator AlloyDB Omni sendiri, yang dapat Anda temukan di catatan rilis untuk versi AlloyDB Omni.
Jika hanya ingin mengupgrade ke versi patch AlloyDB Omni yang lebih baru, Anda dapat mengupgrade hanya cluster database, tanpa perlu mengupgrade Operator AlloyDB Omni itu sendiri.
Setelah menyelesaikan upgrade AlloyDB Omni Operator, ikuti petunjuk di Melakukan upgrade di tempat untuk membuat cluster database baru.
Jika cluster AlloyDB Omni Anda dibuat dengan AlloyDB Omni Operator 1.0.0, tambahkan kolom controlPlaneAgentsVersion ke manifes dan tetapkan ke 1.1.0 sebelum mengupgrade cluster ke versi 15.5.5. Jika tidak, error berikut akan ditampilkan:
admission webhook "vdbcluster.alloydbomni.dbadmin.goog" denied the request: unsupported database version 15.5.5 and/or control plane agents version 1.0.0
Contoh manifes dengan kolom controlPlaneAgentsVersion terlihat seperti berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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."]]