[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-03。"],[],[],null,["# Perform a minor database version upgrade for AlloyDB Omni on Kubernetes\n\nSelect a documentation version: 16.8.0keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/upgrade-kubernetes-database-minor-version)\n- [16.8.0](/alloydb/omni/16.8.0/docs/upgrade-kubernetes-database-minor-version)\n- [15.12.0](/alloydb/omni/15.12.0/docs/upgrade-kubernetes-database-minor-version)\n\n\u003cbr /\u003e\n\n|\n| **Preview\n| --- [AlloyDB Omni](/alloydb/omni/16.8.0/docs/overview)**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| You can process personal data for this feature as outlined in the\n| [Cloud Data Processing\n| Addendum](/terms/data-processing-addendum), subject to the obligations and restrictions described in the agreement under\n| which you access Google Cloud.\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page describes how to perform a minor database version upgrade for\nAlloyDB Omni on Kubernetes.\n\nTo perform a minor database version upgrade, there are two options:\n\n- Low downtime upgrade: For\n [high availability (HA)](/alloydb/omni/16.8.0/docs/high-availability/overview)\n environments running AlloyDB Omni version 15.7.1 or later,\n AlloyDB Omni upgrades your standby instances first. Then, the\n AlloyDB Omni operator performs a switchover, promoting one of the\n upgraded standby instances to be your new primary instance. After the\n switchover succeeds, your old primary instance is updated.\n\n This process ensures minimal downtime during the upgrade.\n- Simultaneous upgrade: For all other circumstances, the\n AlloyDB Omni operator upgrades all instances simultaneously. This\n means you will experience downtime during the upgrade.\n\nLimitations\n-----------\n\nFor low downtime upgrades, one standby instance is unavailable at any given\ntime. To ensure that your database cluster doesn't reach zero Recovery Point\nObjective (RPO) and doesn't risk losing data, your database cluster must have\none primary instance and at least two standby instances.\n\nBefore your begin\n-----------------\n\n- If your cluster is HA and the AlloyDB Omni version is older than 15.7.1, follow the steps listed in [Update the database clusters](/alloydb/omni/16.8.0/docs/upgrade-kubernetes-operator-version#update-clusters) before following this minor version upgrade process.\n- Identify a low traffic period where you can perform the minor version upgrade.\n- To avoid any data loss, [back up your data](/alloydb/omni/16.8.0/docs/backup-kubernetes).\n\nEnable the low downtime minor database version upgrade process\n--------------------------------------------------------------\n\nTo enable the low downtime minor database version upgrade process, add the\nfollowing annotation to your database cluster. \n\n```\nkubectl annotate dbclusters.alloydbomni.dbadmin.goog DB_CLUSTER_NAME\ndbcluster.dbadmin.goog/enableLDTM=true\n```\n\nReplace the following variable:\n\n- \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e: the name of your database cluster. It's the same database cluster name that you provided when you created it. For more information, see [Install AlloyDB Omni on Kubernetes](/alloydb/omni/16.8.0/docs/deploy-kubernetes#create).\n\nUpgrade your AlloyDB Omni version\n---------------------------------\n\nTo upgrade your 16.8.0 version, update the\n`databaseVersion` and the `controlPlaneAgentsVersion` fields in the cluster's\nmanifest file, and then re-apply the file.\n\nThe following is the beginning of a manifest file that specifies version\n16.8.0 for `databaseVersion` and version\n1.5.0 for `controlPlaneAgentsVersion`: \n\n apiVersion: alloydbomni.dbadmin.goog/v1\n kind: DBCluster\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDB_CLUSTER_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n databaseVersion: \"16.8.0\"\n controlPlaneAgentsVersion: \"1.5.0\"\n ...\n\nReplace the following variable:\n\n- \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e: the name of your database cluster. It's the same database cluster name that you provided when you created it. For more information, see [Install AlloyDB Omni on Kubernetes](/alloydb/omni/16.8.0/docs/deploy-kubernetes#create).\n\n### Monitor the upgrade process\n\nAfter you update your manifest file, the AlloyDB Omni operator starts\nthe upgrade process. To monitor the upgrade process, check the\n`DBCUpgradeInProgress` condition. \n\n```\nkubectl get dbclusters.alloydbomni.dbadmin.goog DB_CLUSTER_NAME -o yaml | yq '.status.conditions[] | select(.type == \"DBCUpgradeInProgress\")'\n```\n\nReplace the following variable:\n\n- \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e: the name of your database cluster. It's the same database cluster name that you provided when you created it. For more information, see [Install AlloyDB Omni on Kubernetes](/alloydb/omni/16.8.0/docs/deploy-kubernetes#create).\n\nWhile the process is in progress, the status is `true`. When the process is\ncomplete, the condition's status changes to `false`.\n\nTroubleshooting\n---------------\n\nIf you receive any failure messages during the upgrade process, see the\nfollowing sections:\n\n- [Pre-upgrade failures](#pre-upgrade-failures)\n- [Upgrade failures](#upgrade-failures)\n\n### Pre-upgrade failures\n\nIf you receive a pre-upgrade failure on your database cluster, then check the\nmessage and address the problem accordingly.\n\nIf you would like to bypass the pre-upgrade failure message, then you can enable\nthe `force-upgrade` annotation. \n\n```\nkubectl annotate dbclusters.alloydbomni.dbadmin.goog DB_CLUSTER_NAME upgrade.alloydbomni.dbadmin.google/force-upgrade=true\n```\n\nReplace the following variable:\n\n- \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e: the name of your database cluster. It's the same database cluster name that you provided when you created it. For more information, see [Install AlloyDB Omni on Kubernetes](/alloydb/omni/16.8.0/docs/deploy-kubernetes#create).\n\nAfter the upgrade process completes, set the `force-upgrade` annotation to\n`false`.\n\n### Upgrade failures\n\nDuring the automatic upgrade process, there are several points where it might\nfail in HA environments. For more information about each failure scenario and\nwhich subsequent actions the AlloyDB Omni operator takes, see the\nfollowing table.\n\n#### Fix primary and standby instances with different minor versions\n\nTo resolve this problem, choose one of the following options:\n\n- If the issue that caused the upgrade failure is fixed, retry the upgrade.\n\n To retry the upgrade, remove the upgrade's `start-time` annotation from\n your instance. After you remove the annotation, the\n AlloyDB Omni operator generates a new start time and re-initiates\n the upgrade process. \n\n ```\n kubectl annotate dbclusters.alloydbomni.dbadmin.goog DB_CLUSTER_NAME upgrade.alloydbomni.dbadmin.google/start-time-\n ```\n\n Replace the following variable:\n - \u003cvar translate=\"no\"\u003eDB_CLUSTER_NAME\u003c/var\u003e: the name of your database cluster. It's the same database cluster name that you provided when you created it. For more information, see [Install AlloyDB Omni on Kubernetes](/alloydb/omni/16.8.0/docs/deploy-kubernetes#create).\n- If the issue that caused the upgrade failure persists, then downgrade your\n instance to the previous AlloyDB Omni operator version.\n\n To downgrade your instance, follow the [upgrade process](#upgrade)\n and change the `databaseVersion` and `controlPlaneAgentsVersion` fields in\n the manifest file to the version you used before."]]