Hi,
I started looking into deploying out the various beats based on the examples in the documentation to our OpenShift 3.11 cluster and have run into some issues. I wonder if there are quickstart examples for OpenShift given the block is generally a no-go:
podTemplate:
spec:
securityContext:
runAsUser: 0
I'm setting up heartbeat to get started, it seemed the simplest option and have not been able to get the pod rolling:
6m 3h 51 heartbeat-beat-heartbeat-667744cc.1627d1f5b16c4a1d ReplicaSet Warning FailedCreate replicaset-controller Error creating: pods "heartbeat-beat-heartbeat-667744cc-" is forbidden: unable to validate against any security context constraint: [spec.volumes[0]: Invalid value: "hostPath": hostPath volumes are not allowed to be used spec.containers[0].securityContext.securityContext.runAsUser: Invalid value: 0: must be in the ranges: [1000360000, 1000369999]]
4m 4m 8 heartbeat.1627dbf513377bbf Beat Warning AssociationError beat-controller Association backend for elasticsearch is not configured
4m 4m 1 heartbeat.1627dbf524a8af1b Beat Normal AssociationStatusChange beat-kibana-association-controller Association status changed from [] to [Established]
4m 4m 1 heartbeat.1627dbf539331c72 Beat Normal AssociationStatusChange beat-es-association-controller Association status changed from [] to [Established]
4m 4m 1 heartbeat-beat-heartbeat.1627dbf53d7f0ba7 Deployment Normal ScalingReplicaSet deployment-controller Scaled up replica set heartbeat-beat-heartbeat-8964c6c44 to 1
2m 4m 15 heartbeat-beat-heartbeat-8964c6c44.1627dbf53e810d28 ReplicaSet Warning FailedCreate replicaset-controller Error creating: pods "heartbeat-beat-heartbeat-8964c6c44-" is forbidden: unable to validate against any security context constraint: [spec.volumes[0]: Invalid value: "hostPath": hostPath volumes are not allowed to be used]
When I saw these event errors I ran:
oc adm policy add-scc-to-user hostaccess heartbeat
oc adm policy add-scc-to-user privileged heartbeat
Which lead to the logs:
4s 4s 1 heartbeat-beat-heartbeat.1627dc3081d5a1f7 Deployment Normal ScalingReplicaSet deployment-controller Scaled up replica set heartbeat-beat-heartbeat-7cfd79499d to 1
4s 4s 8 heartbeat.1627dc30531d642d Beat Warning AssociationError beat-controller Association backend for elasticsearch is not configured
4s 4s 1 heartbeat.1627dc3063753bd1 Beat Normal AssociationStatusChange beat-kibana-association-controller Association status changed from [] to [Established]
4s 4s 1 heartbeat.1627dc3079a61db7 Beat Normal AssociationStatusChange beat-es-association-controller Association status changed from [] to [Established]
1s 4s 10 heartbeat-beat-heartbeat-7cfd79499d.1627dc3082bff32d ReplicaSet Warning FailedCreate replicaset-controller Error creating: pods "heartbeat-beat-heartbeat-7cfd79499d-" is forbidden: unable to validate against any security context constraint: [spec.volumes[0]: Invalid value: "hostPath": hostPath volumes are not allowed to be used spec.containers[0].securityContext.securityContext.runAsUser: Invalid value: 0: must be in the ranges: [1000360000, 1000369999]]
Not sure if I'm missing something. I didn't see anything in the github issues or the documentation for the beats about provisions for running on OpenShift, so any help would be great.