Skip to content

Instantly share code, notes, and snippets.

@developer-guy
Created December 30, 2020 19:08
Show Gist options
  • Save developer-guy/68f0f021c68ab4cc1edbb25edc56e869 to your computer and use it in GitHub Desktop.
Save developer-guy/68f0f021c68ab4cc1edbb25edc56e869 to your computer and use it in GitHub Desktop.
Enable Audit Logging in KinD cluster
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraMounts:
- hostPath: /tmp/audit
containerPath: /tmp/audit
- role: worker
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
apiServer:
extraArgs:
audit-log-path: "/tmp/audit/audit.log"
audit-policy-file: "/tmp/audit/policy.yaml"
extraVolumes:
- name: audit
hostPath: /tmp/audit
mountPath: /tmp/audit
@guettli
Copy link

guettli commented Apr 5, 2024

BTW, there are "official" docs about how to enable audit logs: https://kind.sigs.k8s.io/docs/user/auditing/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment