已删除的 Kubernetes 1.25 API

Anthos Clusters on Bare Metal 1.14 版在 Kubernetes 1.25 上运行。Kubernetes 1.25 已删除某些 API。您可以在 Kubernetes 1.25 已删除的 API 中查看这些已删除的 API 的列表。

确定 API 删除是否对您产生影响

在 Anthos Clusters on Bare Metal 1.13 版中,所有集群都启用了集群审核日志记录功能,并且审核日志会流式传输到 Google Cloud 的运维套件

如需确定您使用的 Kubernetes 服务帐号是否对任何已删除的 API 进行调用,请在日志浏览器中运行提供的查询:

  1. 在 Google Cloud 控制台中,转到 Logging 菜单中的日志浏览器页面。

    转到日志浏览器

  2. 查询字段中,输入以下查询:

    resource.labels.cluster_name = "CLUSTER_NAME" AND
    logName = "projects/PROJECT_ID/logs/externalaudit.googleapis.com%2Factivity" AND
    protoPayload.authenticationInfo.principalEmail:("system:serviceaccount" OR "@") AND
    protoPayload.authenticationInfo.principalEmail!~("system:serviceaccount:kube-system:") AND
    protoPayload.authenticationInfo.principalEmail!~("system:serviceaccount:cert-manager:") AND
    protoPayload.authenticationInfo.principalEmail!~("system:serviceaccount:capi-kubeadm-bootstrap-system:") AND
    protoPayload.authenticationInfo.principalEmail!~("system:serviceaccount:capi-kubeadm-bootstrap-system-webhook:") AND
    protoPayload.authenticationInfo.principalEmail!~("system:serviceaccount:capi-system:") AND
    protoPayload.authenticationInfo.principalEmail!~("system:serviceaccount:capi-system-webhook:") AND
    labels."k8s.io/removed-release"="1.25"
    

    此查询的输出会显示您的任何 Kubernetes 服务帐号是否对已删除的 API 进行调用。