# How to audit AI agent actions in Kubernetes

DevFeed: [How to audit AI agent actions in Kubernetes](<https://devfeed.tech/articles/how-to-audit-ai-agent-actions-in-kubernetes-122905.md>)

Original publisher: [Read original article](<https://nirmata.com/2026/11/09/how-to-audit-ai-agent-actions-in-kubernetes/>)

Author: Ritesh Patel

Published: 2026-11-09T09:41:36.137587Z

Content type: tutorial

Language: en

Sources: [Nirmata](<https://devfeed.tech/sources/nirmata.md>)

Topics: [audit](<https://devfeed.tech/topics/audit.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [ai-governance](<https://devfeed.tech/tags/ai-governance.md>), [audit](<https://devfeed.tech/tags/audit.md>), [audit-log](<https://devfeed.tech/tags/audit-log.md>), [auditing](<https://devfeed.tech/tags/auditing.md>), [compliance](<https://devfeed.tech/tags/compliance.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [kubernetes-security](<https://devfeed.tech/tags/kubernetes-security.md>), [logs](<https://devfeed.tech/tags/logs.md>), [policy](<https://devfeed.tech/tags/policy.md>)

## AI overview

Kubernetes does not record API audit events unless the API server is given an audit policy and a log path. Give each agent its own service account so events can be attributed to that agent, then use ordered policy rules: record Secret access at Metadata level, selected writes at Request level, other agent calls at Metadata level, and finish with a catch-all rule. Events include identity, verb, target object when present, and response status; ResponseComplete events can be used to inspect outcomes. For static-Pod control planes, mount the policy and log directory so records persist; managed control planes require provider-specific settings not covered here. Request bodies may contain sensitive values, and audit logging increases API server memory use. The text also cautions that it does not establish whether RBAC-denied requests generate events, so that behavior should be checked on the cluster.

## Source excerpt

Give each AI agent its own service account, then write an audit policy that names that account. Without a policy file, the API server logs nothing at all.