<p>Being absolutely new to openshift, i'm curious how i can check if any of the running containers are running in &quot;privileged&quot; mode (openshift v4.6). Digging in the documentation and searching the net i could only find information regarding SCCs, which is great and all, but i didnt find anything regarding this (apart from an older version of openshift, where the <code>oc get pods</code> (or something similar command) used to show if a pod was running with such privileges</p>

<p>By default pods use the Restricted SCC. The pod's SCC is determined by the User/ServiceAccount and/or Group. Then, you also have to consider that a SA may or may not be bound to a Role, which can set a list of available SCCs.</p>
<p>To find out what SCC a pod runs under:</p>
<pre class="lang-sh prettyprint-override"><code>oc get pod $POD_NAME -o yaml | grep openshift.io/scc
</code></pre>
<p>The following commands can also be useful:</p>
<pre class="lang-sh prettyprint-override"><code># get pod's SA name
oc get pod $POD_NAME -o yaml | grep serviceAccount:
# list service accounts that can use a particular SCC
oc adm policy who-can use scc privileged
# list users added by the oc adm policy command
oc get scc privileged -o yaml
# check roles and role bindings of your SA
# you need to look at rules.apiGroups: security.openshift.io
oc get rolebindings -o wide
oc get role $ROLE_NAME -o yaml
</code></pre>
