gpt4 book ai didi

kubernetes - 如何找到 GKE 的控制平面日志?

转载 作者:行者123 更新时间:2023-12-05 08:16:52 25 4
gpt4 key购买 nike

所以有关于 auditing-logs 的页面我很困惑:

The k8s.io service is used for Kubernetes audit logs. These logs are generated by the Kubernetes API Server component and they contain information about actions performed using the Kubernetes API. For example, any changes you make on a Kubernetes resource by using the kubectl command are recorded by the k8s.io service. For more information, see Auditing in the Kubernetes documentation.

The container.googleapis.com service is used for GKE control plane audit logs. These logs are generated by the GKE internal components and they contain information about actions performed using the GKE API. For example, any changes you perform on a GKE cluster configuration using a gcloud command are recorded by the container.googleapis.com service.

我该选哪个:

  1. /var/log/kube-apiserver.log - API 服务器,负责为 API 提供服务
  2. /var/log/kube-controller-manager.log - 管理复制 Controller 的 Controller

或者这些都类似于 EKS,其中审核日志表示 separate thing

Audit (audit) – Kubernetes audit logs provide a record of the individual users, administrators, or system components that have affected your cluster. For more information, see Auditing in the Kubernetes documentation.

最佳答案

如果集群仍然存在,您应该可以在 GKE 上执行以下操作

kubectl proxy
curl http://localhost:8001/logs/kube-apiserver.log

据我所知,无法获取已删除集群的服务器日志。

关于kubernetes - 如何找到 GKE 的控制平面日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66001637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com