Introduction

OpenTelemetry is an open-source observability framework for generating, capturing, and transmitting telemetry data for cloud-native software systems. The OpenTelemetry Operator is a component designed to simplify the deployment and management of OpenTelemetry components within Kubernetes clusters.

Prerequisites

Below are the prerequisites for setting up OpenTelemetry Operator with Kubernetes clusters:

  • Kubernetes: A container orchestration platform that automates the deployment, scaling, and management of containerized applications.
  • Helm 3 or above: Helm is a package manager for Kubernetes that helps you manage Kubernetes applications. Helm 3 is the latest version (as of my last update), offering improvements and new features over previous versions. It helps in simplifying the deployment and management of complex applications on Kubernetes clusters.
  • Cert Manager: Cert Manager is a Kubernetes add-on that automates the management and helps in securing your applications by providing a way to automatically provision for your Kubernetes deployments.

Install Cert Manager

Use the below command to install Cert Manager using Helm:

helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.14.4 \
  --set installCRDs=true

Verify your setup

  1. Verify connection to cluster.
    Execute the below command and make sure you do not get any errors. In case of errors, it is implied that connection to the cluster is not possible.

    kubectl cluster-info
    
  2. Verify the Helm version.
    The output of the below command should be 3 or above.

    helm version
    

Add necessary Helm repositories

The below commands are used to add Helm repositories to your local Helm configuration and update them to ensure you have the latest charts available:

  1. Adding Cert Manager Helm Repo: This command adds the Jetstack Helm repository to your local Helm configuration.

    helm repo add jetstack https://charts.jetstack.io --force-update
    
  2. Add OpenTelemetry Operator Helm Repo: This command adds the OpenTelemetry Helm repository to your local Helm configuration.

    helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
    
  3. Add Prometheus Helm Repo: This command adds the Prometheus Helm repository to your local Helm configuration.

    helm repo add prometheus https://prometheus-community.github.io/helm-charts
    
  4. Update Repos: This command updates your local Helm repository cache with the latest information from the added repositories.

    helm repo update
    

Install OpsRamp Cloud Stack Helm

This section describes the set of instructions for installing OpsRamp Cloud Stack using Helm.

  1. Download and Extract Helm Chart: This step downloads the OpsRamp Cloud Stack Helm chart and extracts it.

    helm pull oci://us-docker.pkg.dev/opsramp-registry/agent-images/opsramp-cloud-stack/opsramp-cloud-stack \
     --version 0.1.0 \
     --untar
    cd opsramp-cloud-stack
    
  2. Install: The command installs or upgrades the OpsRamp Cloud Stack Helm chart.

    helm upgrade -i \
      opsramp-cloud-stack . \
      --namespace opsramp \
      --create-namespace \
      --wait=true \
      --set 
    global.Token="eyJvdF9lbmRwb2ludCI6Imh0dHBzOi8vU1BsZXZlbE5ldy5pbnQtYXBpLm9wc3JhbXAubmV0L2F1dGgvb2F1dGgvdG9rZW4iLCJvdF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsIm90X2tleSI6IlVRdXJnS2pkQThBZjdOVndXRHYzTk1WY1NNVVVOM1plIiwib3Rfc2VjcmV0IjoidzN6anNZUmN3dUpxTk1QRTY4UnB3VVpZbUpLdWs4MmU3RWZ3Mldrc3hlOVFlc3hKOWtSZThyc2pTM0U0ZGR6RyIsIm90X21ldHJpY3MiOiJTUGxldmVsTmV3LmludC1hcGkub3BzcmFtcC5uZXQ6NDQzIiwib3RfbG9ncyI6ImludC5hcGkub3BzcmFtcC5uZXQ6NDQzIiwidHBfZW5kcG9pbnQiOiIiLCJ0cF9rZXkiOiIiLCJ0cF9zZWNyZXQiOiIiLCJ0cF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsInRwX21ldHJpY3MiOiIiLCJ0cF9sb2dzIjoiIiwidHBfdHJhY2VzIjoiIn0="
    

    Note:

    • The provided token is generated according to the configuration of feature flags for logs, traces, and metrics. Therefore, if any of these features are toggled on or off, it is necessary to redeploy the Helm chart with the most recent token provided above.
    • Installation commands should be executed within the directory where the Helm chart is extracted.
    • You can use the same command for both installing the chart initially and upgrading it later. However, when upgrading, ensure you download and extract the latest version of the chart before executing the upgrade command.
    • By default, the installation of metrics, logs, traces, and kube-events collectors is included. If there is a need to disable any of these components, you must specify the corresponding flags provided in the Disable components section.

  3. To verify the installation of OpsRamp Cloud Stack, follow these steps:

    • Check if the Helm chart is installed.
      helm list -n opsramp
      

    • Ensure all collector Custom Resources (CRs) are configured.
      kubectl get OpenTelemetryCollector -n opsramp
      

    • Confirm if all collector services are configured.
      kubectl get svc -n opsramp
      

    • Verify if all pods are running.
      kubectl get pods -n opsramp
      

Disable components

To disable specific components during the installation of OpsRamp Cloud Stack using Helm, follow the provided instructions:

  1. Use the below command to disable metric collection:

    helm upgrade -i \
       opsramp-cloud-stack . \
       --namespace opsramp \
       --create-namespace \
       --set 
    global.Token="eyJvdF9lbmRwb2ludCI6Imh0dHBzOi8vU1BsZXZlbE5ldy5pbnQtYXBpLm9wc3JhbXAubmV0L2F1dGgvb2F1dGgvdG9rZW4iLCJvdF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsIm90X2tleSI6IlVRdXJnS2pkQThBZjdOVndXRHYzTk1WY1NNVVVOM1plIiwib3Rfc2VjcmV0IjoidzN6anNZUmN3dUpxTk1QRTY4UnB3VVpZbUpLdWs4MmU3RWZ3Mldrc3hlOVFlc3hKOWtSZThyc2pTM0U0ZGR6RyIsIm90X21ldHJpY3MiOiJTUGxldmVsTmV3LmludC1hcGkub3BzcmFtcC5uZXQ6NDQzIiwib3RfbG9ncyI6ImludC5hcGkub3BzcmFtcC5uZXQ6NDQzIiwidHBfZW5kcG9pbnQiOiIiLCJ0cF9rZXkiOiIiLCJ0cF9zZWNyZXQiOiIiLCJ0cF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsInRwX21ldHJpY3MiOiIiLCJ0cF9sb2dzIjoiIiwidHBfdHJhY2VzIjoiIn0=" \
      --wait=true \
      --set metricCollector.enabled=false \
    
  2. Use the below command to disable logs collection:

    helm upgrade -i \
       opsramp-cloud-stack . \
       --namespace opsramp \
       --create-namespace \
       --set 
    global.Token="eyJvdF9lbmRwb2ludCI6Imh0dHBzOi8vU1BsZXZlbE5ldy5pbnQtYXBpLm9wc3JhbXAubmV0L2F1dGgvb2F1dGgvdG9rZW4iLCJvdF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsIm90X2tleSI6IlVRdXJnS2pkQThBZjdOVndXRHYzTk1WY1NNVVVOM1plIiwib3Rfc2VjcmV0IjoidzN6anNZUmN3dUpxTk1QRTY4UnB3VVpZbUpLdWs4MmU3RWZ3Mldrc3hlOVFlc3hKOWtSZThyc2pTM0U0ZGR6RyIsIm90X21ldHJpY3MiOiJTUGxldmVsTmV3LmludC1hcGkub3BzcmFtcC5uZXQ6NDQzIiwib3RfbG9ncyI6ImludC5hcGkub3BzcmFtcC5uZXQ6NDQzIiwidHBfZW5kcG9pbnQiOiIiLCJ0cF9rZXkiOiIiLCJ0cF9zZWNyZXQiOiIiLCJ0cF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsInRwX21ldHJpY3MiOiIiLCJ0cF9sb2dzIjoiIiwidHBfdHJhY2VzIjoiIn0=" \
       --wait=true \
       --set logsCollector.enabled=false \
    
  3. Use the below command to disable trace collection:

    helm upgrade -i \
       opsramp-cloud-stack . \
       --namespace opsramp \
       --create-namespace \
       --set
    global.Token="eyJvdF9lbmRwb2ludCI6Imh0dHBzOi8vU1BsZXZlbE5ldy5pbnQtYXBpLm9wc3JhbXAubmV0L2F1dGgvb2F1dGgvdG9rZW4iLCJvdF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsIm90X2tleSI6IlVRdXJnS2pkQThBZjdOVndXRHYzTk1WY1NNVVVOM1plIiwib3Rfc2VjcmV0IjoidzN6anNZUmN3dUpxTk1QRTY4UnB3VVpZbUpLdWs4MmU3RWZ3Mldrc3hlOVFlc3hKOWtSZThyc2pTM0U0ZGR6RyIsIm90X21ldHJpY3MiOiJTUGxldmVsTmV3LmludC1hcGkub3BzcmFtcC5uZXQ6NDQzIiwib3RfbG9ncyI6ImludC5hcGkub3BzcmFtcC5uZXQ6NDQzIiwidHBfZW5kcG9pbnQiOiIiLCJ0cF9rZXkiOiIiLCJ0cF9zZWNyZXQiOiIiLCJ0cF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsInRwX21ldHJpY3MiOiIiLCJ0cF9sb2dzIjoiIiwidHBfdHJhY2VzIjoiIn0=" \
       --wait=true \
       --set tracesCollector.enabled=false \
    
  4. Use the below command to disable the kube events collection:

    helm upgrade -i \
       opsramp-cloud-stack . \
       --namespace opsramp \
       --create-namespace \
       --set
    global.Token="eyJvdF9lbmRwb2ludCI6Imh0dHBzOi8vU1BsZXZlbE5ldy5pbnQtYXBpLm9wc3JhbXAubmV0L2F1dGgvb2F1dGgvdG9rZW4iLCJvdF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsIm90X2tleSI6IlVRdXJnS2pkQThBZjdOVndXRHYzTk1WY1NNVVVOM1plIiwib3Rfc2VjcmV0IjoidzN6anNZUmN3dUpxTk1QRTY4UnB3VVpZbUpLdWs4MmU3RWZ3Mldrc3hlOVFlc3hKOWtSZThyc2pTM0U0ZGR6RyIsIm90X21ldHJpY3MiOiJTUGxldmVsTmV3LmludC1hcGkub3BzcmFtcC5uZXQ6NDQzIiwib3RfbG9ncyI6ImludC5hcGkub3BzcmFtcC5uZXQ6NDQzIiwidHBfZW5kcG9pbnQiOiIiLCJ0cF9rZXkiOiIiLCJ0cF9zZWNyZXQiOiIiLCJ0cF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsInRwX21ldHJpY3MiOiIiLCJ0cF9sb2dzIjoiIiwidHBfdHJhY2VzIjoiIn0=" \
       --wait=true \
       --set kubeEventsCollector.enabled=false \
    
  5. The kube-state-metrics and Prometheus node exporter are installed by default for the collection of additional metrics in the cluster. To disable the installation of optional components such as kube-state-metrics and Prometheus Node Exporter, use the following command:

    helm upgrade -i \
       opsramp-cloud-stack . \
       --namespace opsramp \
       --create-namespace \
       --set 
    global.Token="eyJvdF9lbmRwb2ludCI6Imh0dHBzOi8vU1BsZXZlbE5ldy5pbnQtYXBpLm9wc3JhbXAubmV0L2F1dGgvb2F1dGgvdG9rZW4iLCJvdF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsIm90X2tleSI6IlVRdXJnS2pkQThBZjdOVndXRHYzTk1WY1NNVVVOM1plIiwib3Rfc2VjcmV0IjoidzN6anNZUmN3dUpxTk1QRTY4UnB3VVpZbUpLdWs4MmU3RWZ3Mldrc3hlOVFlc3hKOWtSZThyc2pTM0U0ZGR6RyIsIm90X21ldHJpY3MiOiJTUGxldmVsTmV3LmludC1hcGkub3BzcmFtcC5uZXQ6NDQzIiwib3RfbG9ncyI6ImludC5hcGkub3BzcmFtcC5uZXQ6NDQzIiwidHBfZW5kcG9pbnQiOiIiLCJ0cF9rZXkiOiIiLCJ0cF9zZWNyZXQiOiIiLCJ0cF90ZW5hbnRJZCI6ImNmZTFjZTdlLTlhMDQtNDc5ZS1hZjkyLTU4OGM5OWY2ZmNiNyIsInRwX21ldHJpY3MiOiIiLCJ0cF9sb2dzIjoiIiwidHBfdHJhY2VzIjoiIn0=" \
       --wait=true \
       --set kubeStateMetrics.enabled=false \
       --set nodeExporter.enabled=false
    

Uninstall OpsRamp cloud stack

  • To uninstall OpsRamp Cloud Stack, you can use the following command:
     helm uninstall opsramp-cloud-stack -n opsramp
    

  • The Custom Resource Definition (CRD) created by the OpsRamp Cloud Stack Helm chart for OpenTelemetry Collector will not be removed automatically upon uninstallation. You need to delete it manually by using the below command:
    kubectl delete crd opentelemetrycollectors.opentelemetry.io
    kubectl delete crd opampbridges.opentelemetry.io
    kubectl delete crd instrumentations.opentelemetry.io