rules:# Don't log watch requests by the"system:kube-proxy" on endpoints or services - level:Noneusers: ["system:kube-proxy"]verbs: ["watch"]resources: - group:""# core API groupresources: ["endpoints","services"]# Don't log authenticated requests to certain non-resource URL paths. - level:NoneuserGroups: ["system:authenticated"]nonResourceURLs: - "/api*"# Wildcard matching. - "/version"# Log the request body of configmap changes in kube-system. - level:Requestresources: - group:""# core API groupresources: ["configmaps"]# This rule only applies to resources in the "kube-system" namespace.# The empty string "" can be used to select non-namespaced resources.namespaces: ["kube-system"]# Log configmap and secret changes in all other namespaces at the Metadata level. - level:Metadataresources: - group:""# core API groupresources: ["secrets","configmaps"]# Log all other resources in core and extensions at the Request level. - level:Requestresources: - group:""# core API group - group:"extensions"# Version of group should NOT be included.# A catch-all rule to log all other requests at the Metadata level. - level:Metadata
# clusters refers to the remote service.clusters: - name:name-of-remote-audit-servicecluster:certificate-authority:/path/to/ca.pem# CA for verifying the remote service.server:https://audit.example.com/audit# URL of remote service to query. Must use 'https'.# users refers to the API server's webhook configuration.users: - name:name-of-api-serveruser:client-certificate:/path/to/cert.pem# cert for the webhook plugin to useclient-key:/path/to/key.pem# key matching the cert# kubeconfig files require a context. Provide one for the API server.current-context:webhookcontexts:- context:cluster:name-of-remote-audit-serviceuser:name-of-api-severname:webhook