run container as root user run container as root user kubernetes kubernetes

run container as root user


As described in the kubernetes docs, you can set the security context for the container and set the runAsUser property as such:

 containers:  - name: ...    image: ...    securityContext:      runAsUser: 0

This will make the container execute internally as the root user.