Forked from jstakun/gist:b4d9c5ed567433ecd84fb203c2a85d96
Created
October 1, 2021 00:23
-
-
Save hai-voquang/c6d6241a32c755e6c4200cb0a6ed3528 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