hello-kubernetes icon indicating copy to clipboard operation
hello-kubernetes copied to clipboard

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

Open Alestrix opened this issue 2 years ago • 0 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 https://github.com/paulbouwer/hello-kubernetes/blob/c9d0a54c5f79baa439073166073f2737896eae0c/deploy/helm/hello-kubernetes/templates/deployment.yaml#L18 the chart could be installed successfully.

Alestrix avatar Jul 04 '22 08:07 Alestrix