How to deploy the different OpenTelemetry components on "infra" nodes using nodeSelector and tolerations in OpenShift 4
Environment
- Red Hat OpenShift Container Platform
- 4
- Red Hat OpenShift distributed tracing data collection
Issue
- Need to schedule the
OpenTelemetrypods on dedicated nodes.
Resolution
- The example below shows how to configure the
tolerationsfor a Node that has defined the followingtaints:
taints:
- effect: NoSchedule
key: node-role.kubernetes.io/infra
value: reserved
- effect: NoExecute
key: node-role.kubernetes.io/infra
value: reserved
- Modify the
opentelemetrycollectorsobject like this:
spec:
nodeSelector:
node-role.kubernetes.io/infra: ""
tolerations:
- effect: NoExecute
key: node-role.kubernetes.io/infra
operator: Equal
value: reserved
- effect: NoSchedule
key: node-role.kubernetes.io/infra
operator: Equal
value: reserved
Diagnostic Steps
- Check the pod placement for the pods:
# oc get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
cluster-collector-collector-6d9864b575-gqvwh 1/1 Running 0 14s 10.131.2.3 ocp413-nv7bb-infra-0-h6jmr <none> <none>
SBR
Product(s)
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.