<p>After reading about kubernetes pod security context in the k8s documentation (<a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a>) - I have a question that I could not find an answer to.</p>
<p>The security context allows adding runAsUser setting with a user ID. Can this be used to run a container image that has NOT been modified to run as a non-root user. Meaning if the runAsUser is set to say 1000 and the container image that runs in this pod, does not use a USER directive / or basically is built to run as root, will the runAsUser setting override the container image?
Will the container run with user 1000 or will it continue to run as root?</p>
<p>Working on to setup Kubernetes and try this scenario in a cluster but would like to understand the concept and what the expected behavior is.</p>

<p>Yes this will run the container with the provided user id (ignoring the user in the container image).</p>
