Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Ada beberapa rilis Kubernetes yang telah menghentikan penggunaan dan menghapus API. Jika
Anda mengupgrade cluster Google Distributed Cloud ke versi Kubernetes baru, dan
workload Anda menggunakan API yang telah dihapus, workload Anda dapat
terganggu. Ikuti langkah-langkah dalam dokumen ini untuk menentukan apakah workload Anda menggunakan salah satu API yang dihapus untuk versi Kubernetes tertentu sebelum mengupgrade cluster.
Menentukan apakah penghapusan API memengaruhi Anda
Langkah-langkah berikut mengharuskan cluster Google Distributed Cloud Anda mengaktifkan logging audit cluster dan log audit di-streaming ke Google Cloud Observability, yang merupakan perilaku default.
Untuk menentukan apakah Akun Layanan Kubernetes yang Anda gunakan melakukan panggilan ke API yang dihapus, jalankan kueri yang disediakan di Logs Explorer:
Di konsol Google Cloud , buka halaman Logs Explorer di menu
Logging.
CLUSTER_NAME: nama cluster yang berisi
beban kerja yang Anda periksa.
PROJECT_ID: ID Google Cloud project yang digunakan cluster Anda untuk log dan metrik (clusterOperations.projectID).
KUBERNETES_MINOR_VERSION: versi Kubernetes
minor, seperti 1.25, yang telah menghapus API.
Output dari kueri ini menunjukkan apakah ada Akun Layanan Kubernetes Anda yang membuat panggilan ke API yang telah dihapus untuk rilis minor Kubernetes tertentu.
[[["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."],[],[],null,["There are several Kubernetes releases that have deprecated and removed APIs. If\nyou upgrade a Google Distributed Cloud cluster to a new Kubernetes version, and\nyour workloads use any APIs that have been removed, your workloads can be\ndisrupted. Follow the steps in this document to determine whether your workloads\nuse any of the removed APIs for a given Kubernetes version before you upgrade\nyour cluster.\n\nFor a list of removed APIs by Kubernetes release, see [Deprecated API Migration\nGuide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/) in the\nKubernetes documentation.\n\nDetermine if the API deletion affects you\n\nThe following steps require that your Google Distributed Cloud clusters have\ncluster [audit logging](/kubernetes-engine/distributed-cloud/bare-metal/docs/how-to/audit-logging) enabled and that\naudit logs are streamed to [Google Cloud Observability](/stackdriver/docs), which is the\ndefault behavior.\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\" OR \"@\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:kube-system:\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:cert-manager:\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:capi-kubeadm-bootstrap-system:\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:capi-kubeadm-bootstrap-system-webhook:\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:capi-system:\") AND\n protoPayload.authenticationInfo.principalEmail!~(\"system:serviceaccount:capi-system-webhook:\") AND\n labels.\"k8s.io/removed-release\"=\"\u003cvar label=\"k8s minor version\" translate=\"no\"\u003eKUBERNETES_MINOR_VERSION\u003c/var\u003e\"\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: the name of the cluster that contains\n the workloads that you're checking.\n\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the Google Cloud project that\n your cluster uses for logs and metrics (`clusterOperations.projectID`).\n\n - \u003cvar translate=\"no\"\u003eKUBERNETES_MINOR_VERSION\u003c/var\u003e: the minor Kubernetes\n version, such as 1.25, that has removed APIs.\n\n The output from this query shows if any of your Kubernetes Service Accounts\n make calls to API that have been removed for the given Kubernetes minor\n release."]]