<p>Is there anyway to configure pod  logging in Kubernetes in order to see who has created/modified it and that should visible in logs?</p>
<p>I tried over internet but not found answers!</p>

sudeep
<p>A cluster audit policy is needed to monitor activity in your cluster. It audits user activities, applications that use Kubernetes APIs, and the control plane itself.</p>
<p>The Audit Policy defines which events need to be logged and what data should be logged for each event.</p>
<p>You can either write these logs to a file path or create a webhook to send these events to an external HTTP API.</p>
<p>In your case, this policy should be sufficient.</p>
<pre><code>apiVersion: audit.k8s.io/v1
kind: Policy
rules:
  - level: Metadata
    resources:
    - group: &quot;&quot;
      resources: [&quot;pods&quot;]
</code></pre>
<p>You can specify the level as &quot;Request&quot; or &quot;RequestResponse&quot;, if you want to capture more data for each event.</p>
<p>You can refer to this <a href="https://arabitnetwork.com/2021/03/13/k8s-enabling-auditing-logs-step-by-step/" rel="nofollow noreferrer">step-by-step tutorial</a> to apply this policy to your cluster.</p>
<p>For more information, please check these docs - <a href="https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/" rel="nofollow noreferrer">K8s docs</a></p>
