Creating seccomp profiles
Use the SeccompProfile object to create seccomp profiles.
SeccompProfile objects can restrict syscalls within a container, limiting the access of your application.
Procedure
-
Create a project by running the following command:
$ oc new-project my-namespace -
Create the
SeccompProfileobject:apiVersion: security-profiles-operator.x-k8s.io/v1beta1 kind: SeccompProfile metadata: name: profile1 spec: defaultAction: SCMP_ACT_LOGThe seccomp profile will be saved in
/var/lib/kubelet/seccomp/operator/<namespace>/<name>.json.An
initcontainer creates the root directory of the Security Profiles Operator to run the Operator withoutrootgroup or user ID privileges. A symbolic link is created from the rootless profile storage/var/lib/openshift-security-profilesto the defaultseccomproot path inside of the kubelet root/var/lib/kubelet/seccomp/operator.