<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Audit on Exoscale Academy</title><link>https://layer5io.github.io/exoscale-academy/pr-preview/pr-378/learning-paths/1e2a8e46-937c-47ea-ab43-5716e3bcab2e/workshop-cka-preparation/10.operations/exercises/audit/</link><description>Recent content in Audit on Exoscale Academy</description><generator>Hugo</generator><language>en</language><atom:link href="https://layer5io.github.io/exoscale-academy/pr-preview/pr-378/learning-paths/1e2a8e46-937c-47ea-ab43-5716e3bcab2e/workshop-cka-preparation/10.operations/exercises/audit/index.xml" rel="self" type="application/rss+xml"/><item><title>Solution</title><link>https://layer5io.github.io/exoscale-academy/pr-preview/pr-378/learning-paths/1e2a8e46-937c-47ea-ab43-5716e3bcab2e/workshop-cka-preparation/10.operations/exercises/audit/solution/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://layer5io.github.io/exoscale-academy/pr-preview/pr-378/learning-paths/1e2a8e46-937c-47ea-ab43-5716e3bcab2e/workshop-cka-preparation/10.operations/exercises/audit/solution/</guid><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;On the &lt;em&gt;controlplane&lt;/em&gt; node, create the file &lt;em&gt;/etc/kubernetes/audit-policy.yaml&lt;/em&gt; with the following content:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit the API Server Pod specification (in the file &lt;em&gt;/etc/kubernetes/manifests/kube-apiserver.yaml&lt;/em&gt;) by adding the following two volume definitions:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;- name: audit
 hostPath:
 path: /etc/kubernetes/audit-policy.yaml
 type: File
- name: audit-log
 hostPath:
 path: /var/log/kubernetes/audit/
 type: DirectoryOrCreate
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and also add the following entries to the &lt;em&gt;volumeMounts&lt;/em&gt; field of the container:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;- mountPath: /etc/kubernetes/audit-policy.yaml
 name: audit
 readOnly: true
- mountPath: /var/log/kubernetes/audit/
 name: audit-log
 readOnly: false
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start a simple Pod:&lt;/p&gt;</description></item></channel></rss>