DB_CLUSTER_NAME: nama cluster database Anda. Nama cluster database ini 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 berikut:
Jika Anda menjalankan operator AlloyDB Omni versi 1.0.0 atau yang lebih baru, outputnya adalah nomor versi operator AlloyDB Omni yang berjalan di cluster Kubernetes Anda.
Jika Anda menjalankan operator AlloyDB Omni versi 1.0.0 atau yang lebih baru, langkah selanjutnya bergantung pada versi AlloyDB Omni yang ingin Anda upgrade. 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.7.0 mendukung PostgreSQL versi 15.7 dan tidak memiliki patch rilis AlloyDB Omni.
Pilih opsi penginstalan yang sesuai untuk versi target Anda:
Skenario penginstalan
Langkah-langkah update
Anda ingin mengupgrade ke versi AlloyDB Omni yang
mendukung PostgreSQL versi yang lebih baru.
Upgrade operator AlloyDB Omni dan 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. Gunakan
tabel kompatibilitas versi operator AlloyDB Omni
untuk memverifikasi bahwa versi operator AlloyDB Omni Anda kompatibel dengan
versi operator Anda.
Anda hanya ingin mengupgrade ke versi patch AlloyDB Omni yang lebih baru.
Untuk mengupdate dbCluster, Anda harus mengupdate versi databaseVersion dan
controlPlaneAgentsVersion dalam file manifes. Berikut adalah
bagian dari file manifes yang menentukan databaseVersion versi 15.7.0 dan controlPlaneAgentsVersion versi 1.3.0:
[[["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-04 UTC."],[[["\u003cp\u003eUpgrading AlloyDB Omni in Kubernetes depends on both your current AlloyDB Omni version and the target version you are upgrading to.\u003c/p\u003e\n"],["\u003cp\u003eYou can determine the current AlloyDB Omni version of your database cluster by using the \u003ccode\u003ekubectl get dbclusters.alloydbomni.dbadmin.goog\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eIf your AlloyDB Omni operator version is 1.0.0 or later, the steps required for upgrading depend on whether you're upgrading to a new PostgreSQL version or only a newer patch version.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading the AlloyDB Omni operator involves defining environment variables, downloading the latest operator, applying custom resource definitions, and upgrading the Helm chart.\u003c/p\u003e\n"],["\u003cp\u003eWhen upgrading the operator, you may be required to update both the \u003ccode\u003edatabaseVersion\u003c/code\u003e and the \u003ccode\u003econtrolPlaneAgentsVersion\u003c/code\u003e in the \u003ccode\u003edbCluster\u003c/code\u003e manifest file.\u003c/p\u003e\n"]]],[],null,["# Migrate to the latest version of the AlloyDB Omni Kubernetes operator\n\nSelect a documentation version: 15.7.0keyboard_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 describes how to upgrade the AlloyDB Omni operator. The steps to upgrade AlloyDB Omni in Kubernetes depend on your current version of AlloyDB Omni and the version that you upgrade to.\n\n\u003cbr /\u003e\n\nDetermine your current versions\n-------------------------------\n\nTo check the version of AlloyDB Omni used by your database\ncluster, run the following 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\nMake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e: the name of your database cluster. It's\n the same database cluster name that you declared when\n [you created it](/alloydb/omni/15.7.0/docs/deploy-kubernetes#create).\n\n- \u003cvar translate=\"no\"\u003eNAMESPACE\u003c/var\u003e: the Kubernetes namespace of your database\n cluster.\n\nIf you run version 1.0.0 or later of the AlloyDB Omni operator, then this\ncommand prints the version of AlloyDB Omni used by your database\ncluster.\n\nTo check the version of the AlloyDB Omni operator installed on your\nKubernetes cluster, run the following 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, the\noutput is the version number of the AlloyDB Omni operator running on your\nKubernetes cluster.\n\nIf you run a version of AlloyDB Omni operator earlier than\n1.0.0, follow the instructions in\n[Upgrade from a pre-1.0.0 AlloyDB Omni operator](/alloydb/omni/15.7.0/docs/manage#older-operator).\nOtherwise, continue with\n[Check your target version numbers](#check-target-version).\n\nCheck your target version numbers\n---------------------------------\n\nIf you run a version of AlloyDB Omni operator 1.0.0 or later, then\nyour next steps depend on the version of AlloyDB Omni that\nyou want to upgrade to. The AlloyDB Omni version number has\nthe 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.7.0\nsupports PostgreSQL version 15.7 and doesn't have a AlloyDB Omni\nrelease patch.\n\nChoose the installation option that works for your target version:\n\nUpgrade the AlloyDB Omni operator\n---------------------------------\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're upgrading to---for example,\n `1.3.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 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\n To update the `dbCluster`, you need to update the `databaseVersion` and the\n `controlPlaneAgentsVersion` versions in the manifest file. The following is\n part of a manifest file that specifies version 15.7.0\n of `databaseVersion` and version 1.3.0 of\n `controlPlaneAgentsVersion`: \n\n ```html\n apiVersion: alloydbomni.dbadmin.goog/v1\n kind: DBCluster\n metadata:\n name: DB_CLUSTER_NAME\n spec:\n databaseVersion: \"15.7.0\"\n controlPlaneAgentsVersion: \"1.3.0\"\n ...\n ```\n | **Note:** When you upgrade the AlloyDB Omni operator, the database restarts unless all of the following are true:\n | - You're upgrading the AlloyDB Omni operator version 1.1.1 to a newer version.\n | - You're using the AlloyDB Omni database version 15.5.5 or later.\n | - AlloyDB AI is not [enabled](/alloydb/omni/15.7.0/docs/install-with-alloydb-ai?resource=kubernetes#enable-alloydb-ai).\n | If the database restarts, no data loss is expected."]]