@@ -174,6 +174,15 @@ of security defaults while preserving the functionality of the workload. It is
174
174
possible that the default profiles differ between container runtimes and their
175
175
release versions, for example when comparing those from CRI-O and containerd.
176
176
177
+ {{< note >}}
178
+ Enabling the feature will neither change the Kubernetes
179
+ ` securityContext.seccompProfile ` API field nor add the deprecated annotations of
180
+ the workload. This provides users the possibility to rollback anytime without
181
+ actually changing the workload configuration. Tools like
182
+ [ ` crictl inspect ` ] ( https://github.com/kubernetes-sigs/cri-tools ) can be used to
183
+ verify which seccomp profile is being used by a container.
184
+ {{< /note >}}
185
+
177
186
Some workloads may require a lower amount of syscall restrictions than others.
178
187
This means that they can fail during runtime even with the ` RuntimeDefault `
179
188
profile. To mitigate such a failure, you can:
@@ -203,6 +212,51 @@ kind: Cluster
203
212
apiVersion : kind.x-k8s.io/v1alpha4
204
213
featureGates :
205
214
SeccompDefault : true
215
+ nodes :
216
+ - role : control-plane
217
+ image : kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac
218
+ kubeadmConfigPatches :
219
+ - |
220
+ kind: JoinConfiguration
221
+ nodeRegistration:
222
+ kubeletExtraArgs:
223
+ seccomp-default: "true"
224
+ - role : worker
225
+ image : kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac
226
+ kubeadmConfigPatches :
227
+ - |
228
+ kind: JoinConfiguration
229
+ nodeRegistration:
230
+ kubeletExtraArgs:
231
+ feature-gates: SeccompDefault=true
232
+ seccomp-default: "true"
233
+ ` ` `
234
+
235
+ If the cluster is ready, then running a pod:
236
+
237
+ ` ` ` shell
238
+ kubectl run --rm -it --restart=Never --image=alpine alpine -- sh
239
+ ```
240
+
241
+ Should now have the default seccomp profile attached. This can be verified by
242
+ using ` docker exec ` to run ` crictl inspect ` for the container on the kind
243
+ worker:
244
+
245
+ ``` shell
246
+ docker exec -it kind-worker bash -c \
247
+ ' crictl inspect $(crictl ps --name=alpine -q) | jq .info.runtimeSpec.linux.seccomp'
248
+ ```
249
+
250
+ ``` json
251
+ {
252
+ "defaultAction" : " SCMP_ACT_ERRNO" ,
253
+ "architectures" : [" SCMP_ARCH_X86_64" , " SCMP_ARCH_X86" , " SCMP_ARCH_X32" ],
254
+ "syscalls" : [
255
+ {
256
+ "names" : [" ..." ]
257
+ }
258
+ ]
259
+ }
206
260
```
207
261
208
262
## Create a Pod with a seccomp profile for syscall auditing
0 commit comments