paulbouwer / hello-kubernetes

Provides a demo app to deploy to a Kubernetes cluster. It displays a message, the name of the pod and details of the node it's deployed to.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working when Policy runAsNonRoot is set, need to set securityContext.runAsUser

Alestrix opened this issue · comments

In our company's internally managed k8s platform the policy runAsNonRoot is set and this causes the deployment to fail with

Error: container has runAsNonRoot and image has non-numeric user (node), cannot verify user is non-root

After editing deployment.yaml and inserting this

      securityContext:
        runAsUser: 1000
        runAsGroup: 1000

in

the chart could be installed successfully.