Created
January 11, 2021 14:51
-
-
Save ikurni/3c242563570288fb179a20e2ef4cd436 to your computer and use it in GitHub Desktop.
Run Openshift Container as root
This file contains 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
### To run Openshift container as root, need to do below command : | |
oc adm policy add-scc-to-user privileged -z default -n my-project-namespace | |
oc edit deployment/my-apps-deploy | |
### Find the securityContext line, and edit : | |
### securityContext: | |
### runAsUser: 0 | |
### Save the deployment, and delete pods if the pods hasn't been deleted automatically |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment