There are several Kubernetes versions that have removed APIs. If you upgrade
a Google Distributed Cloud cluster to a new Kubernetes version, and your
workloads use any APIs that have been removed, your workloads could be
disrupted. Follow the steps given here to determine whether your workloads use
any of the removed APIs for a given Kubernetes version before you upgrade your
cluster.
You can see a list of deleted APIs in each Kubernetes version in
this doc.
Determine if the API deletion affects you
To determine if the Kubernetes Service Accounts you use make calls to any
deleted APIs, run the supplied query in
Logs Explorer:
In the Google Cloud console, go to the Logs Explorer page in the
Logging menu.
The output from this query shows if any of your Kubernetes Service Accounts
make deleted API calls in the given KUBERNETES_MINOR_VERSION, for example,
1.25.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eUpgrading a Google Distributed Cloud cluster to a new Kubernetes version can disrupt workloads if they use removed APIs.\u003c/p\u003e\n"],["\u003cp\u003eA list of deleted APIs for each Kubernetes version is available in the Kubernetes deprecation guide.\u003c/p\u003e\n"],["\u003cp\u003eYou can determine if your workloads are affected by API deletions by enabling Cloud Audit Logs and streaming them to Google Cloud Observability.\u003c/p\u003e\n"],["\u003cp\u003eThe Logs Explorer tool can be used with a specific query to identify if Kubernetes Service Accounts are making calls to deleted APIs in a given Kubernetes minor version.\u003c/p\u003e\n"]]],[],null,["# Detect removed Kubernetes APIs\n\n\u003cbr /\u003e\n\nThere are several Kubernetes versions that have removed APIs. If you upgrade\na Google Distributed Cloud cluster to a new Kubernetes version, and your\nworkloads use any APIs that have been removed, your workloads could be\ndisrupted. Follow the steps given here to determine whether your workloads use\nany of the removed APIs for a given Kubernetes version before you upgrade your\ncluster.\n\nYou can see a list of deleted APIs in each Kubernetes version in\n[this doc](https://kubernetes.io/docs/reference/using-api/deprecation-guide/).\n\nDetermine if the API deletion affects you\n-----------------------------------------\n\n| **Note:** the steps below require that Cloud Audit Logs is enabled and audit logs are streamed to [Google Cloud Observability](/stackdriver/docs).\n\nTo determine if the Kubernetes Service Accounts you use make calls to any\ndeleted APIs, run the supplied query in\n[Logs Explorer](/logging/docs/view/logs-explorer-interface):\n\n1. In the Google Cloud console, go to the **Logs Explorer** page in the\n **Logging** menu.\n\n [Go to Logs Explorer](https://console.cloud.google.com/logs/query)\n2. In the **Query** field, enter the following query:\n\n resource.labels.cluster_name = \"\u003cvar label=\"name of the cluster\" translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\" AND\n logName = \"projects/\u003cvar label=\"the project ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/externalaudit.googleapis.com%2Factivity\" AND\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:kube-system:\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:gke-system:\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"kube-admin\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"kubernetes-admin\") AND\n labels.\"k8s.io/removed-release\"=\"\u003cvar label=\"k8s minor version\" translate=\"no\"\u003eKUBERNETES_MINOR_VERSION\u003c/var\u003e\"\n\n The output from this query shows if any of your Kubernetes Service Accounts\n make deleted API calls in the given KUBERNETES_MINOR_VERSION, for example,\n 1.25."]]