Audit Logging on Kubernetes
Set the parameters for apiserver, pass the file path for the audit log yaml inside the container(can be any path you want)
-
Create a cluster using your custom cluster type
-
While cluster is deploying, go to this page by clicking on
view details
of components (double gear icon)
Click on the second settings
icon from the top, you will see components details, find the volumes
chart
Click edit
for apiserver, specify the folder you want to mount to this container
Redeploy apiserver, this path will mount to the container and you can load the audit policy.
By exec into the kubeapi you can now tail the kube-audit log we have created.