7,540
edits
Changes
→SecurityContextConstraints
https://medium.com/bitnami-perspectives/running-containers-in-openshift-629af79945b5
<pre>
# kubectl get SecurityContextConstraints anyuid -n default -o yaml
</pre>
<source lang="C++">
allowHostDirVolumePlugin: false
allowHostIPC: false
kubernetes.io/description: anyuid provides all features of the restricted SCC
but allows users to run with any UID and any GID.
name: anyuid
priority: 10
readOnlyRootFilesystem: false
supplementalGroups:
type: RunAsAny
users: []- system:serviceaccount:mynamespace:default
volumes:
- configMap
- secret
</source>
'''Run container as root'''<br>
<pre>
# oc edit scc anyuid
securitycontextconstraints.security.openshift.io/anyuid edited
</pre>