<p>Is there any way I can run container in k8s as root user or other user.
Like in docker </p>

<pre><code>docker run --user &lt;user&gt; &lt;image&gt;
</code></pre>

<p>Is there any yaml configuration for running with </p>

<p>As described in the <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container" rel="noreferrer">kubernetes docs</a>, you can set the security context for the container and set the <code>runAsUser</code> property as such:</p>

<pre><code> containers:
  - name: ...
    image: ...
    securityContext:
      runAsUser: 0
</code></pre>

<p>This will make the container execute internally as the root user.</p>
