Skip to content

Instantly share code, notes, and snippets.

@jstakun
Last active October 1, 2021 00:23
Show Gist options
  • Select an option

  • Save jstakun/b4d9c5ed567433ecd84fb203c2a85d96 to your computer and use it in GitHub Desktop.

Select an option

Save jstakun/b4d9c5ed567433ecd84fb203c2a85d96 to your computer and use it in GitHub Desktop.
Root container execution in Openshift
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