Invalid value: "hostPath": hostPath volumes are not allowed to be used
Issue
- Getting hostPath errors when spinning up a pod
$ oc logs docker-registry-1-deploy
--> Scaling docker-registry-1 to 1
--> FailedCreate: docker-registry-1 Error creating: pods "docker-registry-1-" is forbidden: unable to validate against any security context constraint: [spec.containers[0].securityContext.privileged: Invalid value: true: Privileged containers are not allowed spec.containers[0].securityContext.volumes[0]: Invalid value: "hostPath": hostPath volumes are not allowed to be used]
error: couldn't scale docker-registry-1 to 1: timed out waiting for "docker-registry-1" to be synced
- 500 error when pushing to docker-registry using hostPath or hostMount
# docker push 172.30.86.174:5000/example/test-image
The push refers to a repository [172.30.86.174:5000/example/test-image]
aabae48a5fa8: Retrying in 1 second
d4d87debc120: Retrying in 1 second
f1c7cb70e415: Retrying in 1 second
65956f7f583a: Retrying in 1 second
6f31e408653c: Retrying in 1 second
457598cf1733: Waiting
3291ee6ef6e0: Waiting
8d4d1ab5ff74: Waiting
received unexpected HTTP status: 500 Internal Server Error
Environment
- Red Hat OpenShift Container Platform
- 3.5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.