Red Hat build of OpenTelemetry のインストール


Red Hat build of OpenTelemetry 3.8

OpenTelemetry Operator および Collector インスタンスのデプロイ

Red Hat OpenShift Documentation Team

概要

このドキュメントでは、OpenShift に Red Hat build of OpenTelemetry をインストールする方法を説明します。Web コンソールまたは CLI のいずれかを使用して、OpenTelemetry Operator をデプロイし、namespace を作成し、OpenTelemetry Collector インスタンスを設定する方法を説明します。RBAC リソースのセットアップとノードスケジューリングオプションの設定手順が含まれます。

第1章 インストール

Red Hat build of OpenTelemetry をインストールするには、次の手順を実行します。

  1. Red Hat build of OpenTelemetry Operator をインストールします。
  2. OpenTelemetry Collector インスタンスの namespace を作成します。
  3. OpenTelemetryCollector カスタムリソースを作成して、OpenTelemetry Collector インスタンスをデプロイします。

1.1. Web コンソールからの Red Hat build of OpenTelemetry のインストール

OpenShift Container Platform Web コンソールから Red Hat build of OpenTelemetry をインストールできます。

前提条件

  • cluster-admin ロールを持つクラスター管理者として Web コンソールにログインしている。
  • Red Hat OpenShift Dedicated の場合、dedicated-admin ロールを持つアカウントを使用してログインしている。

手順

  1. Red Hat build of OpenTelemetry Operator をインストールします。

    1. Web コンソールで、Red Hat build of OpenTelemetry Operator を検索します。

      ヒント

      OpenShift Container Platform 4.19 以前では、OperatorsOperatorHub に移動します。

      OpenShift Container Platform 4.20 以降では、EcosystemSoftware Catalog に移動します。

    2. Red Hat が提供する Red Hat build of OpenTelemetry Operator を選択し、InstallInstallView Operator と進みます。

      重要

      デフォルトのプリセットで Operator がインストールされます。

      • Update channelstable
      • Installation modeAll namespaces on the cluster
      • Installed Namespaceopenshift-opentelemetry-operator
      • Update approvalAutomatic
    3. インストール済み Operator ページの Details タブの ClusterServiceVersion details で、インストールの StatusSucceeded であることを確認します。
  2. HomeProjectsCreate Project に移動して、次のステップで作成する OpenTelemetry Collector インスタンス用に、許可される任意のプロジェクトを作成します。openshift- 接頭辞で始まるプロジェクト名は許可されません。
  3. OpenTelemetry Collector インスタンスを作成します。

    1. EcosystemInstalled Operators に移動します。
    2. OpenTelemetry CollectorCreate OpenTelemetry CollectorYAML view を選択します。
    3. YAML view で、OpenTelemetryCollector カスタムリソース (CR) をカスタマイズします。

      OpenTelemetryCollector CR の例

      apiVersion: opentelemetry.io/v1beta1
      kind: OpenTelemetryCollector
      metadata:
        name: otel
        namespace: <permitted_project_of_opentelemetry_collector_instance> 
      1
      
      spec:
        mode: <deployment_mode> 
      2
      
        config:
          receivers: 
      3
      
            otlp:
              protocols:
                grpc:
                http:
            jaeger:
              protocols:
                grpc: {}
                thrift_binary: {}
                thrift_compact: {}
                thrift_http: {}
            zipkin: {}
          processors: 
      4
      
            batch: {}
            memory_limiter:
              check_interval: 1s
              limit_percentage: 50
              spike_limit_percentage: 30
          exporters: 
      5
      
            debug: {}
          service:
            pipelines:
              traces:
                receivers: [otlp,jaeger,zipkin]
                processors: [memory_limiter,batch]
                exporters: [debug]
      Copy to Clipboard Toggle word wrap

      1
      OpenTelemetryCollector デプロイメント用に選択したプロジェクト。openshift- 接頭辞で始まるプロジェクト名は許可されません。
      2
      サポートされている次の値を持つデプロイメントモード: デフォルトの deploymentdaemonsetstatefulset、または sidecar。詳細は、デプロイメントモード を参照してください。
      3
      詳細は、レシーバー を参照してください。
      4
      詳細は、プロセッサー を参照してください。
      5
      詳細は、エクスポーター を参照してください。
    4. Create を選択します。

検証

  1. Project: ドロップダウンリストを使用して、OpenTelemetry Collector インスタンスのプロジェクトを選択します。
  2. EcosystemInstalled Operators に移動して、OpenTelemetry Collector インスタンスの ステータスCondition: Ready であることを確認します。
  3. WorkloadsPods に移動して、OpenTelemetry Collector インスタンスのすべてのコンポーネント Pod が実行されていることを確認します。

1.2. CLI を使用した Red Hat build of OpenTelemetry のインストール

Red Hat build of OpenTelemetry はコマンドラインからインストールできます。

前提条件

  • cluster-admin ロールを持つクラスター管理者によるアクティブな OpenShift CLI (oc) セッション。

    ヒント
    • OpenShift CLI (oc) のバージョンが最新であり、OpenShift Container Platform バージョンと一致していることを確認してください。
    • oc login を実行します。

      $ oc login --username=<your_username>
      Copy to Clipboard Toggle word wrap

手順

  1. Red Hat build of OpenTelemetry Operator をインストールします。

    1. 次のコマンドを実行して、Red Hat build of OpenTelemetry Operator のプロジェクトを作成します。

      $ oc apply -f - << EOF
      apiVersion: project.openshift.io/v1
      kind: Project
      metadata:
        labels:
          kubernetes.io/metadata.name: openshift-opentelemetry-operator
          openshift.io/cluster-monitoring: "true"
        name: openshift-opentelemetry-operator
      EOF
      Copy to Clipboard Toggle word wrap
    2. 以下のコマンドを実行して、Operator グループを作成します。

      $ oc apply -f - << EOF
      apiVersion: operators.coreos.com/v1
      kind: OperatorGroup
      metadata:
        name: openshift-opentelemetry-operator
        namespace: openshift-opentelemetry-operator
      spec:
        upgradeStrategy: Default
      EOF
      Copy to Clipboard Toggle word wrap
    3. 以下のコマンドを実行して、サブスクリプションを作成します。

      $ oc apply -f - << EOF
      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: opentelemetry-product
        namespace: openshift-opentelemetry-operator
      spec:
        channel: stable
        installPlanApproval: Automatic
        name: opentelemetry-product
        source: redhat-operators
        sourceNamespace: openshift-marketplace
      EOF
      Copy to Clipboard Toggle word wrap
    4. 次のコマンドを実行して、Operator のステータスを確認します。

      $ oc get csv -n openshift-opentelemetry-operator
      Copy to Clipboard Toggle word wrap
  2. 後続のステップで作成する OpenTelemetry Collector インスタンス用に、許可される任意のプロジェクトを作成します。

    • 許可されるプロジェクトをメタデータなしで作成するには、次のコマンドを実行します。

      $ oc new-project <permitted_project_of_opentelemetry_collector_instance> 
      1
      Copy to Clipboard Toggle word wrap
      1
      openshift- 接頭辞で始まるプロジェクト名は許可されません。
    • 許可されるプロジェクトをメタデータ付きで作成するには、次のコマンドを実行します。

      $ oc apply -f - << EOF
      apiVersion: project.openshift.io/v1
      kind: Project
      metadata:
        name: <permitted_project_of_opentelemetry_collector_instance> 
      1
      
      EOF
      Copy to Clipboard Toggle word wrap
      1
      openshift- 接頭辞で始まるプロジェクト名は許可されません。
  3. OpenTelemetry Collector 用に作成したプロジェクトに OpenTelemetry Collector インスタンスを作成します。

    注記

    同じクラスター上の別々のプロジェクトに複数の OpenTelemetry Collector インスタンスを作成できます。

    1. OpenTelemetryCollector カスタムリソース (CR) をカスタマイズします。

      OpenTelemetryCollector CR の例

      apiVersion: opentelemetry.io/v1beta1
      kind: OpenTelemetryCollector
      metadata:
        name: otel
        namespace: <permitted_project_of_opentelemetry_collector_instance> 
      1
      
      spec:
        mode: <deployment_mode> 
      2
      
        config:
          receivers: 
      3
      
            otlp:
              protocols:
                grpc:
                http:
            jaeger:
              protocols:
                grpc: {}
                thrift_binary: {}
                thrift_compact: {}
                thrift_http: {}
            zipkin: {}
          processors: 
      4
      
            batch: {}
            memory_limiter:
              check_interval: 1s
              limit_percentage: 50
              spike_limit_percentage: 30
          exporters: 
      5
      
            debug: {}
          service:
            pipelines:
              traces:
                receivers: [otlp,jaeger,zipkin]
                processors: [memory_limiter,batch]
                exporters: [debug]
      Copy to Clipboard Toggle word wrap

      1
      OpenTelemetryCollector デプロイメント用に選択したプロジェクト。openshift- 接頭辞で始まるプロジェクト名は許可されません。
      2
      サポートされている次の値を持つデプロイメントモード: デフォルトの deploymentdaemonsetstatefulset、または sidecar。詳細は、デプロイメントモード を参照してください。
      3
      詳細は、レシーバー を参照してください。
      4
      詳細は、プロセッサー を参照してください。
      5
      詳細は、エクスポーター を参照してください。
    2. 次のコマンドを実行して、カスタマイズされた CR を適用します。

      $ oc apply -f - << EOF
      <OpenTelemetryCollector_custom_resource>
      EOF
      Copy to Clipboard Toggle word wrap

検証

  1. 次のコマンドを実行して、OpenTelemetry Collector Pod の status.phaseRunning で、conditionstype: Ready であることを確認します。

    $ oc get pod -l app.kubernetes.io/managed-by=opentelemetry-operator,app.kubernetes.io/instance=<namespace>.<instance_name> -o yaml
    Copy to Clipboard Toggle word wrap
  2. 次のコマンドを実行して、OpenTelemetry Collector サービスを取得します。

    $ oc get service -l app.kubernetes.io/managed-by=opentelemetry-operator,app.kubernetes.io/instance=<namespace>.<instance_name>
    Copy to Clipboard Toggle word wrap

1.3. taint および toleration の使用

専用ノードで OpenTelemetry Pod をスケジュールするには、OpenShift 4 で nodeSelector と toleration を使用してインフラノードにさまざまな OpenTelemetry コンポーネントをデプロイする方法 を参照してください。

1.4. 必要な RBAC リソースの自動作成

一部の Collector コンポーネントは、RBAC リソースの設定を必要とします。

手順

  • Red Hat build of OpenTelemetry Operator が権限を自動的に作成できるように、opentelemetry-operator-controller-manage サービスアカウントに次の権限を追加します。

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: generate-processors-rbac
    rules:
    - apiGroups:
      - rbac.authorization.k8s.io
      resources:
      - clusterrolebindings
      - clusterroles
      verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: generate-processors-rbac
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: generate-processors-rbac
    subjects:
    - kind: ServiceAccount
      name: opentelemetry-operator-controller-manager
      namespace: openshift-opentelemetry-operator
    Copy to Clipboard Toggle word wrap

法律上の通知

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る