Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
extraMounts:
- hostPath: ~/kind/audit-policy.yaml
containerPath: /etc/kubernetes/audit-policy.yaml
- hostPath: ~/kind/apiserver-audit.log
containerPath: /var/log/apiserver-audit.log
kubeadmConfigPatches:
- |
# v1beta2 only works for 1.15+
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
metadata:
name: config
apiServer:
extraArgs:
audit-log-path: /var/log/apiserver-audit.log
audit-policy-file: /etc/kubernetes/audit-policy.yaml
extraVolumes:
- name: auditpolicy
pathType: File
readOnly: true
hostPath: /etc/kubernetes/audit-policy.yaml
mountPath: /etc/kubernetes/audit-policy.yaml
- name: auditlog
pathType: File
readOnly: false
hostPath: /var/log/apiserver-audit.log
mountPath: /var/log/apiserver-audit.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment