[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-30 (世界標準時間)。"],[],[],null,["# Kubernetes 1.27 deprecated APIs\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page explains how to prepare clusters for upgrades to GKE\nversion 1.27. You can find API clients making calls to [deprecated APIs removed\nin\n1.27](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.27.md#changelog-since-v1260)\nand update those clients to use GA APIs. For more detailed information, see the\n[Kubernetes deprecated API migration\nguide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-27).\n| **Important:** After June 30, 2024---when [1.26 reaches end of standard\n| support](/kubernetes-engine/docs/release-schedule#schedule-for-release-channels)--- GKE begins to automatically upgrade clusters still using version 1.26 and deprecated APIs (removed in version 1.27) to version 1.27. GKE will stop [pausing automatic\n| upgrades](/kubernetes-engine/docs/deprecations#how_kubernetes_deprecations_work_with) after June 30, 2024 for clusters still using [deprecated APIs removed in\n| version 1.27](/kubernetes-engine/docs/deprecations/apis-1-27). We recommend that you upgrade your clusters to version 1.27 as soon as possible as GKE minor versions that have reached end of support will no longer receive security patches and bug fixes. To learn more about the GKE minor version lifecycle, see [GKE versioning\n| and support](/kubernetes-engine/versioning).\n\nRemoved APIs in version 1.27\n----------------------------\n\nThe deprecated APIs in Kubernetes version 1.27 are either Beta APIs that have\ngraduated to GA (for example `v2`) or from one Beta version to another (for example,\n`v1beta1` to `v1beta2`). The GA APIs provide [longer-term compatibility guarantees](https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecating-parts-of-the-api)\nand should be used in place of the deprecated Beta APIs.\n\nAll existing objects for APIs that have graduated to new versions can be interacted with by\nusing the updated APIs.\n| **Important:** Before upgrading to 1.27, you should update API clients and manifests to use the updated APIs.\n\n### CSIStorageCapacity\n\nThe `storage.k8s.io/v1beta1` API version of CSIStorageCapacity is no longer\nserved as of v1.27.\n\nMigrate manifests and API clients to use the `storage.k8s.io/v1`\nAPI version, available since v1.24. All existing persisted objects are\naccessible using the new API. There are no notable changes in the GA version.\n\nPreparing to upgrade to version 1.27\n------------------------------------\n\nYou do not need to delete and recreate any of your API objects. All existing\npersisted API objects for APIs that graduated to GA can already be read and\nupdated using the new API versions.\n\nHowever, we recommend that you migrate your clients and manifests before\nupgrading to Kubernetes 1.27. To learn more, see [Kubernetes Deprecated API Migration Guide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#what-to-do).\n\nYou can\n[view deprecation insights and recommendations](/kubernetes-engine/docs/deprecations/viewing-deprecation-insights-and-recommendations#view-deprecation-insights-recs)\nto determine if your cluster is using Kubernetes 1.27 deprecated APIs.\nGKE generates deprecation insights when user agents call\ndeprecated APIs, not from the configuration of your Kubernetes objects.\n| **Warning:** If you do not update a client or manifest before the 1.27 upgrade, it will not be able to read/modify existing objects or create new objects. The client or manifest will only be able to read, modify, or create objects once you update it.\n\nFind clusters using deprecated APIs\n-----------------------------------\n\nYou can find which clusters are using deprecated APIs from [deprecation insights](/kubernetes-engine/docs/deprecations/viewing-deprecation-insights-and-recommendations). Deprecation\ninsights also provide information such as which API clients are calling\nthe deprecated APIs in your cluster.\n\nYou can also use audit logs to find which clients are making calls to deprecated\nAPIs.\n\n### Locate API clients making write calls to deprecated APIs\n\nFor clusters with Google Cloud Observability enabled, you can use the following\n[Admin Activity audit log](/kubernetes-engine/docs/how-to/audit-logging#viewing_logs)\nquery to show the use of deprecated APIs by user agents that are not\nGoogle-managed: \n\n resource.type=\"k8s_cluster\"\n labels.\"k8s.io/removed-release\"=\"\u003cvar translate=\"no\"\u003eDEPRECATED_API_MINOR_VERSION\u003c/var\u003e\"\n protoPayload.authenticationInfo.principalEmail:(\"system:serviceaccount\" OR \"@\")\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:kube-system:\")\n\nReplace \u003cvar translate=\"no\"\u003eDEPRECATED_API_MINOR_VERSION\u003c/var\u003e with the minor\nversion where the deprecated API is removed, for example `1.22`.\n\nAdmin Activity audit logs are automatically enabled for GKE\nclusters. With this query, the logs show user agents making write calls to the\ndeprecated APIs.\n\n### Locate API clients making read calls to deprecated APIs\n\nBy default, audit logs show only write calls to the deprecated APIs. To also\nshow read calls to deprecated APIs, configure Data Access audit logs.\n| **Caution:** If you enable additional audit logs, this might incur additional [logging costs](/stackdriver/pricing#logging-pricing-summary). The volume of ingested Data Access audit logs counts toward the Cloud Logging [logs ingestion quota](/logging/quotas#api-limits).\n\nFollow the instructions to [Configure Data Access audit logs with the Google Cloud console](/logging/docs/audit/configure-data-access#config-console). In the Google Cloud console,\nselect the Kubernetes Engine API. In the Log Types tab in the information panel,\nselect `Admin Read` and `Data Read`.\n\nWith these logs enabled, you can now use the original query to see both read\ncalls and write calls to the deprecated APIs.\n\n### Upgrading third-party components\n\n[Deprecation insights](/kubernetes-engine/docs/deprecations/viewing-deprecation-insights-and-recommendations)\nmight display results for third-party agents that make calls to deprecated APIs\nin your cluster.\n\nTo resolve third-party agents calling deprecated APIs, we recommend the\nfollowing best practices:\n\n1. Check with your third-party software provider for an updated version.\n2. Upgrade the third-party software to the latest version. If you cannot upgrade the software, you should test whether upgrading GKE to the version with the removed deprecated APIs would break your service.\n\nWe recommend that you perform this upgrade and the GKE version\nupgrade on a staging cluster to monitor for disruptions before you upgrade your\nproduction clusters.\n\nUpdate clusters impacted by deprecations\n----------------------------------------\n\nTo upgrade clusters impacted by deprecations, perform the following steps:\n\n1. Check which user agents use the deprecated APIs in the [logs](#location-api-clients-deprecated-apis-write-calls).\n2. Update the user agents that use the deprecated APIs to use supported API versions.\n3. Update any third-party software that calls deprecated APIs to the latest versions.\n4. Upgrade a test cluster and test your application in a testing environment before upgrading your production cluster to reduce the risk of disruptions when deprecated APIs are no longer available.\n5. If you can't update an affected user agent, upgrade a separate test cluster\n to check whether the upgrade causes disruptions. If the upgrade doesn't cause\n disruptions, you can\n [upgrade your cluster manually](/kubernetes-engine/docs/how-to/upgrading-a-cluster).\n\n6. After you update all of the user agents, GKE waits until it\n has no longer observed use of deprecated APIs for 30 days, and then unblocks\n automatic upgrades. Automatic upgrades proceed according to the\n [release schedule](/kubernetes-engine/docs/release-schedule).\n\nResources\n---------\n\nMore information is available in the OSS Kubernetes documentation:\n\n- [Kubernetes Blog: Kubernetes Removals and Major Changes In 1.27](https://kubernetes.io/blog/2023/03/17/upcoming-changes-in-kubernetes-v1-27)\n- [Kubernetes 1.27 release notes](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.27.md#changelog-since-v1260)\n- [Kubernetes Deprecated API Migration Guide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-27)"]]