Skip to content

Instantly share code, notes, and snippets.

@yashbhutwala
Created July 19, 2019 13:18
Show Gist options
  • Save yashbhutwala/ed707652e42ea2aa831b2b0109cea3e5 to your computer and use it in GitHub Desktop.
Save yashbhutwala/ed707652e42ea2aa831b2b0109cea3e5 to your computer and use it in GitHub Desktop.
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