Preparing the nodes
Create a machine config path with the contents below and save aspatch.yaml
audit.json
on the node at /var/lib/kubelet/seccomp/profiles
.
The profiles can be used by Kubernetes pods by specfying the pod securityContext
as below:
Note that theThis can be verfied by running the below commands:localhostProfile
uses the name of the profile created underprofiles
directory. So make sure to use path asprofiles/<profile-name.json>
Create a Kubernetes workload that uses the custom Seccomp Profile
Here we’ll be using an example workload from the Kubernetes documentation. First open up a second terminal and run the following talosctl command so that we can view the Syscalls being logged in realtime:talosctl dmesg
command from above should log similar to below: