Cyber Deals - Get up to 65% off on CKA, CKAD, CKS, KCNA, KCSA exams and courses!

OpenShift 4: OSSM Jaeger`s External ElasticSearch

OpenShift 4: OSSM Jaeger`s External ElasticSearch

One of the features provided by Red Hat OpenShift Service Mesh(OSSM) is tracing capability. This capability is provided by Jaeger , an OpenTracing compliant component.

In order to store the tracing data, Jaeger required storage backend. Jaeger support several storage backends such as:

In this blog we going to explore how we can use external ElasticSearch strorage backend instead of operator deployed ElasticSearch.

Prerequisites.

There are several prerequisites that this blog would not recover, ensure that below step are succesfully executed prior attempting step in this blog:

Configuration steps.

  1. In istio-project, create SMCP(Service Mesh Control Plane) with below content:
apiVersion: maistra.io/v1
kind: ServiceMeshControlPlane
metadata:
  name: main-install
  namespace: istio-system
spec:
  istio:
    tracing:
      enabled: false
    global:
      tracer:
        zipkin:
          address: "external-jaeger-collector.istio-system.svc:9411"
      proxy:
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 500m
            memory: 128Mi
    gateways:
      istio-egressgateway:
        autoscaleEnabled: true
      istio-ingressgateway:
        autoscaleEnabled: true
        ior_enabled: true
    grafana:
      enabled: true
    kiali:
      enabled: true
      dashboard:
        jaegerURL: "https://jaeger-istio-system.apps.ocp4.local.bytewise.my"
      jaegerInClusterURL: "external-jaeger-query.istio-system.svc"
    mixer:
      policy:
        autoscaleEnabled: false
      telemetry:
        autoscaleEnabled: false
        resources:
          requests:
            cpu: 100m
            memory: 1Gi
          limits:
            cpu: 500m
            memory: 4Gi
    pilot:
      resources:
        requests:
          cpu: 100m
          memory: 128Mi
      autoscaleEnabled: false
      traceSampling: 50

Note several sections:

a. istio.tracing.enabled is set to "
false
".
b. istio.global.tracer.zipkin.address is set to "
external-jaeger-collector.istio-system.svc:9411
".
c. kiali.dashboard.jaegerURL is set to "
#
".
d. kiali.jaegerInClusterURL is set to "
external-jaeger-collector.istio-system.svc
".
  1. In istio-project, create Jaeger CR to deploy external Jaeger(external from istio-operator) with below content:
apiVersion: jaegertracing.io/v1
kind: "Jaeger"
metadata:
  name: "external-jaeger"
  # Deploy to the Control Plane Namespace
  namespace: istio-system
spec:
  strategy: production
  storage:
    type: elasticsearch
    options:
      es:
        server-urls: # # our external elasticsearch
  # Set Up Authentication for OpenShift
  ingress:
    enabled: true
    security: oauth-proxy
    openshift:
      # This limits user access to the Jaeger instance to users who have access
      # to the control plane namespace. Make sure to set the correct namespace here
      sar: '{"namespace": "istio-system", "resource": "pods", "verb": "get"}'
      htpasswdFile: /etc/proxy/htpasswd/auth

  volumeMounts:
  - name: secret-htpasswd
    mountPath: /etc/proxy/htpasswd
  volumes:
  - name: secret-htpasswd
    secret:
      secretName: htpasswd
More documentation available at https://maistra.io/docs/monitoring_and_tracing/using-existing-jaeger

Validation

  1. Generate some traffic for the service mesh apps to get some tracing data flowing in, if there is no existing apps please follow the example provided from here .

  2. On the elasticsearch node:

root ># curl -k http://192.168.50.10:9200/_cat/indices
yellow open jaeger-service-2020-06-13 e79y1ModTfm7E9hoAcKvKA 5 1   20 1  46.1kb  46.1kb
yellow open jaeger-span-2020-06-13    abI8z42MT4qYnfHnD067ZQ 5 1 2308 0 504.3kb 504.3kb
NOTE: In this example, the shard are in the yellow state due to no replica (since ES is an PoC setup).
3. Browse to Jaeger Console:
Muhammad Aizuddin Zali

Muhammad Aizuddin Zali

RHCA | AppDev & Platform Consultant | DevSecOps


Disclaimer: Views expressed in articles are those of the respective authors and do not necessarily reflect the views of their employers or this site. While we aim for accuracy, please verify information before relying on it, and let us know if you spot an error.
Share:

Related Posts

How to Create, Increase or Decrease Project Quota in OpenShift

How to Create, Increase or Decrease Project Quota in OpenShift

Usually application owner or project owner will specify the quota settings (Memory and CPU) during project creation. But sometimes, they realize that …

OpenShift 4: Red Hat OpenShift Container Storage 4.5 Lab Installation

OpenShift 4: Red Hat OpenShift Container Storage 4.5 Lab Installation

Official documentation of Red Hat OpenShift Container Storage can be found here. This blog merely written only to show on the technical feasibility …

OpenShift 3: Enforcing modern and strong OCP TLS & Cipher Suites

OpenShift 3: Enforcing modern and strong OCP TLS & Cipher Suites

Introduction Enforcing strong and modern cipher is critical to ensure our deployment are well protected from old and weak cipher. Enforcing only …

How to Fix a Failed PV in OpenShift Cluster

How to Fix a Failed PV in OpenShift Cluster

There are several cases a PV (PersistentVolume) appear as Failed in OpenShift or Kubernetes cluster. Once of the reason is wrong ClaimRef by which …

How to delete a pod with Terminating state in OpenShift or Kubernetes Cluster

How to delete a pod with Terminating state in OpenShift or Kubernetes Cluster

There might be situations where you have already deleted pods (or already removed dc aka deployment configuration) but pods are stuck in Terminating …

OpenShift Container Platform 3.11 Installation Documents

OpenShift Container Platform 3.11 Installation Documents

Since OCP 3.11 is available now, you may refer below documents for OpenShift Container Platform 3.11 Installation on different infrastructure or …