Reputation: 179
I'm using audit.k8s.io/v1
api to make some audit policy.
the yaml file that i use:
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
but when i use kubectl api-versions
or kubectl api-resources
to get the api-version/ api-resources I can't find the audit.k8s.io/v1
in api list.
how can i add this api-resource in my api list ? should I do it with CRDs ? but how ?
thanks
Upvotes: 0
Views: 631
Reputation: 44559
You don't need to add any CRD. audit.k8s.io/v1
is not exposed as api-resources
or api-versions
. It's configured directly in kubernetes API server using a flag
--audit-log-version string Default: "audit.k8s.io/v1".
You can change it to something else via above flag if you want to.
Upvotes: 2