本站面向开发者与科研用户,提供开源镜像的搜索和下载加速服务。
所有镜像均来源于原始开源仓库,本站不存储、不修改、不传播任何镜像内容。

opentelemetry-collector-k8s Docker 镜像下载 - 轩辕镜像

opentelemetry-collector-k8s 镜像详细信息和使用指南

opentelemetry-collector-k8s 镜像标签列表和版本信息

opentelemetry-collector-k8s 镜像拉取命令和加速下载

opentelemetry-collector-k8s 镜像使用说明和配置指南

Docker 镜像加速服务 - 轩辕镜像平台

国内开发者首选的 Docker 镜像加速平台

极速拉取 Docker 镜像服务

相关 Docker 镜像推荐

热门 Docker 镜像下载

opentelemetry-collector-k8s
otel/opentelemetry-collector-k8s

opentelemetry-collector-k8s 镜像详细信息

opentelemetry-collector-k8s 镜像标签列表

opentelemetry-collector-k8s 镜像使用说明

opentelemetry-collector-k8s 镜像拉取命令

Docker 镜像加速服务

轩辕镜像平台优势

镜像下载指南

相关 Docker 镜像推荐

适用于Kubernetes的OpenTelemetry Collector,用于在K8s集群中收集、处理和导出遥测数据,以支持集群可观测性需求。
1 收藏0 次下载activeotel镜像

opentelemetry-collector-k8s 镜像详细说明

opentelemetry-collector-k8s 使用指南

opentelemetry-collector-k8s 配置说明

opentelemetry-collector-k8s 官方文档

OpenTelemetry Collector (k8s) 镜像文档

镜像概述和主要用途

OpenTelemetry Collector (k8s) 镜像为 Kubernetes 环境定制,是 OpenTelemetry 可观测性数据处理管道的核心组件。该镜像整合了 open-telemetry/opentelemetry-collector 仓库的核心组件contrib 扩展组件,专为在 Kubernetes 集群中运行设计,提供可观测性数据(traces、metrics、logs)的统一收集、处理、转换与导出能力。

核心功能和特性

  • 组件完整性:集成核心组件(基础接收器、处理器、导出器)与 contrib 组件(Kubernetes 特定扩展、第三方集成插件),满足复杂场景需求。
  • Kubernetes 原生适配:支持从 Kubernetes 资源(Pod、Service、Node 等)自动发现目标、附加元数据,适配集群网络与调度机制。
  • 全链路数据处理:支持 traces、metrics、logs 三类可观测性数据的收集、过滤、转换、聚合、采样等处理操作。
  • 多后端兼容性:可导出数据至主流可观测性平台(如 Prometheus、Jaeger、Grafana、AWS CloudWatch、Azure Monitor 等)。
  • 可扩展架构:通过插件化接收器(Receiver)、处理器(Processor)、导出器(Exporter)扩展功能,支持自定义组件集成。
  • 轻量高效:优化资源占用,支持动态配置更新,适配 Kubernetes 资源限制与请求机制。

使用场景和适用范围

适用环境

  • Kubernetes 集群(包括自建集群、云厂商托管集群如 EKS、GKE、AKS 等)。

典型场景

  • 微服务可观测性:收集分布式微服务的 traces、metrics、logs,统一处理后导出至后端平台。
  • 集群级监控:采集 Kubernetes 节点、Pod、容器的系统指标与日志,实现集群健康状态监控。
  • 多源数据聚合:整合应用埋点数据、基础设施监控数据、第三方服务日志,统一数据格式与标准。
  • 数据治理与合规:对敏感数据脱敏、按规则过滤无效数据、添加统一标签(如环境、集群名称),满足合规需求。

适用用户

  • Kubernetes 管理员、DevOps 工程师、SRE 团队、可观测性平台维护人员。

使用方法和配置说明

基本部署方式

1. Docker 运行(单机测试)

bash
docker run -d \
  --name otel-collector-k8s \
  -p 4317:4317  # OTLP gRPC 接收器端口 \
  -p 4318:4318  # OTLP HTTP 接收器端口 \
  -p 8888:8888  # 指标暴露端口(用于自身监控) \
  -v /path/to/otel-collector-config.yaml:/etc/otelcol/config.yaml \
  otel/opentelemetry-collector-k8s:latest

注:otel/opentelemetry-collector-k8s 为***镜像名称,实际使用时需替换为具体版本标签(如 0.91.0)。

2. Docker Compose 配置(本地测试)

yaml
version: '3'
services:
  otel-collector:
    image: otel/opentelemetry-collector-k8s:latest
    container_name: otel-collector-k8s
    ports:
      - "4317:4317"  # OTLP gRPC
      - "4318:4318"  # OTLP HTTP
      - "8888:8888"  # 自身指标暴露
    volumes:
      - ./otel-collector-config.yaml:/etc/otelcol/config.yaml
    environment:
      - OTEL_LOG_LEVEL=info  # 日志级别:debug/info/warn/error
    restart: unless-stopped

3. Kubernetes 部署(生产环境)

推荐通过 Deployment 或 DaemonSet 部署(根据数据收集范围选择),以下为 Deployment 示例:

1. 创建配置文件 ConfigMap
otel-collector-config.yaml

yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: otel-collector-config
  namespace: observability
data:
  config.yaml: |
    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: 0.0.0.0:4317
          http:
            endpoint: 0.0.0.0:4318
      prometheus:
        config:
          scrape_configs:
            - job_name: 'otel-collector'
              static_configs:
                - targets: ['localhost:8888']
    processors:
      batch:  # 批量处理以减少导出请求数
      resourcedetection:  # 自动添加 Kubernetes 资源元数据
        detectors: [k8s]
        timeout: 10s
        override: false
    exporters:
      logging:  # 控制台输出(调试用)
        loglevel: info
      prometheusremotewrite:  # 导出至 Prometheus
        endpoint: "[***]"
    service:
      pipelines:
        traces:
          receivers: [otlp]
          processors: [batch, resourcedetection]
          exporters: [logging]
        metrics:
          receivers: [otlp, prometheus]
          processors: [batch, resourcedetection]
          exporters: [logging, prometheusremotewrite]

2. 创建 Deployment
otel-collector-deployment.yaml

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: otel-collector
  namespace: observability
spec:
  replicas: 1
  selector:
    matchLabels:
      app: otel-collector
  template:
    metadata:
      labels:
        app: otel-collector
    spec:
      containers:
        - name: otel-collector
          image: otel/opentelemetry-collector-k8s:latest
          resources:
            limits:
              cpu: 1000m
              memory: 1Gi
            requests:
              cpu: 200m
              memory: 256Mi
          ports:
            - containerPort: 4317  # OTLP gRPC
            - containerPort: 4318  # OTLP HTTP
            - containerPort: 8888  # 自身指标
          volumeMounts:
            - name: config-volume
              mountPath: /etc/otelcol/config.yaml
              subPath: config.yaml
          env:
            - name: OTEL_LOG_LEVEL
              value: "info"
            - name: K8S_NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
      volumes:
        - name: config-volume
          configMap:
            name: otel-collector-config

详细配置说明

配置文件结构

Collector 通过配置文件(默认路径 /etc/otelcol/config.yaml)定义数据处理流程,核心配置项包括:

配置项说明
receivers定义数据来源(如 OTLP、Prometheus、Jaeger、Filelog 等),每个接收器含特定配置(端口、协议、采集规则)。
processors定义数据处理逻辑(如 batch 批量处理、filter 数据过滤、resourcedetection 元数据添加、sampling 采样等)。
exporters定义数据导出目标(如 logging 控制台、otlp 远程 OTLP 服务、prometheusremotewrite Prometheus 写入接口、jaeger Jaeger 后端等)。
service定义数据管道(pipelines),将接收器、处理器、导出器关联,按数据类型(traces/metrics/logs)划分。

环境变量

Collector 支持通过环境变量调整运行时行为,常用变量:

变量名说明默认值
OTEL_CONFIG_FILE配置文件路径/etc/otelcol/config.yaml
OTEL_LOG_LEVEL日志级别(debug/info/warn/errorinfo
OTEL_RESOURCE_ATTRIBUTES全局资源属性(键值对,如 service.name=my-service,cluster=prod
K8S_NODE_NAMEKubernetes 节点名称(用于 resourcedetection 处理器,通常通过 downward API 注入)自动从节点元数据获取

参考链接

  • ***仓库:open-telemetry/opentelemetry-collector-releases
  • ***文档:OpenTelemetry Collector 文档
  • 配置示例:Collector 配置示例库

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

oldzhang的头像

oldzhang

运维工程师

Linux服务器

5

"Docker加速体验非常流畅,大镜像也能快速完成下载。"