Last active
October 1, 2021 00:23
-
-
Save jstakun/b4d9c5ed567433ecd84fb203c2a85d96 to your computer and use it in GitHub Desktop.
Root container execution in Openshift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| oc create serviceaccount user-root | |
| oc adm policy add-scc-to-user anyuid -z user-root | |
| oc patch dc/myAppNeedsRoot --patch '{"spec":{"template":{"spec":{"serviceAccountName": "user-root"}}}}' | |
| or | |
| oc set sa dc myAppNeedsRoot user-root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment