<p>I'm using <code>audit.k8s.io/v1</code> api to make some audit policy.</p>
<p>the yaml file that i use:</p>
<pre><code>
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata

</code></pre>
<p>but when i use <code>kubectl api-versions</code> or <code>kubectl api-resources</code> to get the api-version/ api-resources I can't find the <code>audit.k8s.io/v1</code> in api list.</p>
<p>how can i add this api-resource in my api list ? should I do it with CRDs ? but how ?</p>
<p>thanks</p>

alone
<p>You don't need to add any CRD. <code>audit.k8s.io/v1</code> is not exposed as <code>api-resources</code> or <code>api-versions</code>. It's configured directly in kubernetes API server using a flag</p>
<pre><code>--audit-log-version string     Default: &quot;audit.k8s.io/v1&quot;.
</code></pre>
<p>You can change it to something else via above flag if you want to.</p>
