title: Using runAsNonRoot in Kubernetes
body: <p>We’ve been planning for a long time to introduce <code>securityContext: runAsNonRoot: true</code> as a requirement to our pod configurations for a while now.</p>
  
  <p>Testing this today I’ve learnt that since <code>v1.8.4</code> (I think) you also have to specify a particular UID for the user running the container, e.g <code>runAsUser: 333</code>.</p>
  
  <p>This means we not only have to tell developers to ensure their containers don’t run as root, but also specify a specific UID that they should run as, which makes this significantly more problematic for us to introduce.</p>
  
  <p>Have I understood this correctly? What are others doing in this area? To leverage <code>runAsNonRoot</code> is it now required that Docker containers run with a specific and known UID?</p>