curl-XPOST-H"Content-type: application/json"-d'{"Message":"validation error: Running as root is not allowed. The fields spec.securityContext.runAsNonRoot, spec.containers[*].securityContext.runAsNonRoot, and spec.initContainers[*].securityContext.runAsNonRoot must be `true`. Rule check-containers[0] failed at path /spec/securityContext/runAsNonRoot/. Rule check-containers[1] failed at path /spec/containers/0/securityContext/.","Policy":"require-run-as-non-root","Rule":"check-containers","Priority":"warning","Status":"fail","Category":"Pod Security Standards (Restricted)","Source":"Kyverno","Scored":true,"CreationTimestamp":"2021-12-04T10:13:02Z","Resource":{"APIVersion":"v1","Kind":"Pod","Name":"nginx2","Namespace":"test","UID":"ac4d11f3-0aa8-43f0-8056-98f4eae0d956"}}'"http://localhost:8080/api/push"
Body JSON
{"Message":"validation error: Running as root is not allowed. The fields spec.securityContext.runAsNonRoot, spec.containers[*].securityContext.runAsNonRoot, and spec.initContainers[*].securityContext.runAsNonRoot must be `true`. Rule check-containers[0] failed at path /spec/securityContext/runAsNonRoot/. Rule check-containers[1] failed at path /spec/containers/0/securityContext/.","Policy":"require-run-as-non-root","Rule":"check-containers","Priority":"warning","Status":"fail","Category":"Pod Security Standards (Restricted)","Source":"Kyverno","Scored":true,"CreationTimestamp":"2021-12-04T10:13:02Z","Resource":{"APIVersion":"v1","Kind":"Pod","Name":"nginx2","Namespace":"test","UID":"ac4d11f3-0aa8-43f0-8056-98f4eae0d956" }}
[ {"message":"validation error: Running as root is not allowed. The fields spec.securityContext.runAsNonRoot, spec.containers[*].securityContext.runAsNonRoot, and spec.initContainers[*].securityContext.runAsNonRoot must be `true`. Rule check-containers[0] failed at path /spec/securityContext/runAsNonRoot/. Rule check-containers[1] failed at path /spec/containers/0/securityContext/.","policy":"require-run-as-non-root","rule":"check-containers","priority":"warning","status":"fail","category":"Pod Security Standards (Restricted)","scored":true,"resource":{"apiVersion":"v1","kind":"Pod","name":"nginx2","namespace":"test","uid":"ac4d11f3-0aa8-43f0-8056-98f4eae0d956" },"creationTimestamp":"2021-12-04T10:13:02Z" }]