Running an OCP job in privileged mode
Issue
-
I am trying to run a job in OpenShift Container Platform in privileged mode, but am unable to do so. I have assinged scc of "privileged" to my service account. The container runs fine when run as a pod (and in privileged mode), but fails when running in a job:
$ oc describe job example-privileged-test [..] Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedCreate 3s (x3 over 33s) job-controller Error creating: pods "example-privilged-test-" is forbidden: unable to validate against any security context constraint: [spec.containers[0].securityContext.privileged: Invalid value: true: Privileged containers are not allowed]
Environment
- Red Hat OpenShift Container Platform (OCP) 4.5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.