iac.htora.dev · security templates

Home/Refreshers/A record of every action against the cluster API: refresher

A record of every action against the cluster API

Cluster audit logs sent where responders can search them, so exec into a pod or a new role binding is never invisible.

Remember

  1. Someone calls the cluster API: exec, get secrets, create binding.
  2. The control plane writes an audit event: who, what, which object.
  3. It lands in the cloud's log service: kept for a year or more.
  4. Matching events raise an alert: and can flow on to the SIEM.
PlatformUsesThe part that catches people
AWSEKS control plane audit logs, kept and turned into alarmsEKS writes nothing until audit logging is switched on for the cluster.
Google CloudGKE audit logs turned into alerts, with reads recorded where they matterGKE records changes by default and keeps them 400 days.
AzureAKS audit logs in Log Analytics, turned into alertsThe full category, kube-audit, is the one used, and it is the costly one on a busy cluster.
Oracle CloudOKE API server events in the Audit service, turned into alarmsOracle describes the feed as administrative changes, the writes, and does not say whether reads appear.

Run the quick start

Download providersterraform init
Previewterraform plan
Applyterraform apply

Watch out

  • An audit log answers who did it only if it was kept.
  • The detections follow the attack paths on the Kubernetes for defenders page: exec into a pod, new cluster role bindings, anonymous calls, secrets read by people, and bursts of refused requests.
Check it worked

Run kubectl exec into a test pod. An alert fires within minutes, and the audit entry behind it names the user who made the call.

Read the full pageDownload PDF

Registry 0.23.0. Built 2026-11-17.

Made by Habibullah Tora. Source on GitHub. Code under the MIT licence, writing under CC BY 4.0.