hello-kubernetes
hello-kubernetes copied to clipboard
Not working when Policy runAsNonRoot is set, need to set securityContext.runAsUser
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.