# Quick Guide for OTel Agent on Kubernetes for Logs

Use the following sample `helm-values.yaml` file to configure the OpenTelemetry Collector to export logs, metrics, and traces to Kloudfuse. Ensure that you correctly set the protocol as either `https` or `http`, based on TLS being enabled or disabled.

```yaml
image:
  repository: "otel/opentelemetry-collector-contrib"
config:
  exporters:
    logging:
      verbosity: basic
    otlphttp:
      tls:
        insecure: true # add only if you're using insecure communication
      logs_endpoint: https://<REPLACE KFUSE ADDRESS>/ingester/otlp/v1/logs
  extensions:
    health_check: {}
  memory_ballast:
    size_in_percentage: 40
  processors:
    batch:
      timeout: 10s
    resourcedetection:
      detectors:
        - env
        - eks
        - ec2
        - gcp
        - aks
        - azure
      override: false
      timeout: 2s
  receivers:
    otlp:
      protocols:
        grpc:
          endpoint: ${env:MY_POD_IP}:4317
        http:
          cors:
            allowed_origins:
              - http://*
              - https://*
          endpoint: 0.0.0.0:4318
service:
  extensions:
    - health_check
  pipelines:
    logs:
      exporters:
        - otlphttp
      processors:
        - batch
        - resourcedetection
      receivers:
        - otlp
  telemetry:
    metrics:
      address: ${MY_POD_IP}:8888
mode: daemonset
service:
  enabled: true
  nameOverride: otelcol
  ports:
    metrics:
      enabled: true
    otlp:
      enabled: true
    otlp-http:
      enabled: true
  presets:
    kubernetesAttributes:
      enabled: true
  resources: {}
```

Copied!
