# Enable Fleet Management for Kubernetes OpenTelemetry Collectors

## Overview

Use this guide to enable remote configuration in Fleet Management for OpenTelemetry Collectors deployed through the Coralogix Kubernetes integration. After deployment, Fleet Manager provides centralized control over Agent, Cluster Collector, and Gateway configurations.

Fleet Management uses the OpenTelemetry Supervisor to apply remote configuration safely. Each Collector instance includes a Supervisor that polls the Fleet Manager, retrieves configuration updates, and restarts the Collector if needed.

See the Supervisor and configuration behavior details in the [Fleet Manager architecture](https://coralogix.com/docs/user-guides/fleet-management/architecture/index.md) documentation and [Configuration deep dive](https://coralogix.com/docs/user-guides/fleet-management/configuration-deep-dive/index.md).

## Before you begin

- Ensure that kubectl is installed.

- Ensure you run the installation with Helm v3.9+. To check the version run the following command:

  `helm version`

## Set up Fleet Management for Kubernetes

### Step 1: Configure the Kubernetes OTel integration

Follow the installation steps of the [Kubernetes Complete Observability](https://coralogix.com/docs/opentelemetry/kubernetes-observability/kubernetes-complete-observability-basic-configuration/index.md) integration in the Coralogix UI.

### Step 2: Activate Fleet Management

1. Activate the **Fleet Management** toggle. This grants you UI visibility into agent health, version, resource usage, and coverage of your collectors, as well as the ability to create configurations.
1. [Recommended] Activate **Remote configuration** to apply configurations to agents remotely.

### Step 3: Download the integration package

At the end of the integration flow:

1. Download the **otel-config.zip** file.
1. Save the package locally. You will use these configuration files when creating Fleet templates.

The ZIP includes recommended baseline configurations for the Agent, Cluster Collector, and Gateway.

### Step 4: Edit the deployment code

1. In the final installation step, select **Deployment code**.

1. Modify only three sections in the full Helm values YAML:

   - `opentelemetry-cluster-collector`
   - `opentelemetry-agent`
   - `opentelemetry-gateway`

All other sections must remain unchanged.

### Step 5: Update the deployment to enable Fleet Management

Replace the three OTel Collector sections with the following Fleet-enabled configuration.

**opentelemetry-cluster-collector**

```yaml
opentelemetry-cluster-collector:
  presets:
    fleetManagement:
      enabled: true
      agentType: "cluster-collector"
      supervisor:
        enabled: true
```

**opentelemetry-agent**

```yaml
opentelemetry-agent:
  presets:
    fleetManagement:
      enabled: true
      agentType: "agent"
      supervisor:
        enabled: true
```

**opentelemetry-gateway**

```yaml
opentelemetry-gateway:
  enabled: true
  replicaCount: 2
  presets:
    fleetManagement:
      enabled: true
      agentType: "gateway"
      supervisor:
        enabled: true
```

Note

The Gateway replica count (`replicaCount`) can be increased if needed.

### Step 6: Deploy the integration

Deploy the updated values file using the command shown in the integration UI. Example:

```bash
helm upgrade --install otel-coralogix-integration coralogix/otel-integration --namespace default --render-subchart-notes --values - <<'EOF' 
global:
  domain: coralogix.com
  clusterName: test
opentelemetry-cluster-collector:
  presets:
    fleetManagement:
      enabled: true
      agentType: "cluster-collector"
      supervisor:
        enabled: true
opentelemetry-agent:
  presets:
    fleetManagement:
      enabled: true
      agentType: "agent"
      supervisor:
        enabled: true
opentelemetry-gateway:
  enabled: true
  replicaCount: 2
  presets:
    fleetManagement:
      enabled: true
      agentType: "gateway"
      supervisor:
        enabled: true
opentelemetry-ebpf-profiler:
  enabled: false
opentelemetry-ebpf-instrumentation:
  enabled: false
coralogix-operator:
  enabled: false
EOF
```

When deployed:

- Each Collector starts with a minimal bootstrap configuration.
- The Supervisor becomes responsible for merging and applying remote configuration.

(See configuration behavior overview in the [Configuration deep dive](https://coralogix.com/docs/user-guides/fleet-management/configuration-deep-dive/index.md) documentation.)

### Step 7: Validate the deployment

After deploying the integration, verify that your Collectors and Supervisors have successfully registered with Fleet Manager.

1. Access **Fleet Management**, then **Agents**.
1. Confirm that all expected Agents, Cluster Collectors, and Gateways appear.

If agents appear correctly, Fleet connectivity is working and you can proceed to create and activate configurations.

### Step 8: Create a configuration group in Fleet Management

1. Access **Fleet Management**, then **Configurations**.
1. Select **+ New configuration**.

This opens a new configuration group, which contains all versions of a single configuration and/or a configuration family.

Configuration families let you maintain synchronized configurations, like Agent, Cluster Collector, and Gateway. Learn more in the [Configuration management](https://coralogix.com/docs/user-guides/fleet-management/configuration-management/index.md) guide.

### Step 9: Add the three configurations to form a configuration family

Create three new configurations for the Agent, Cluster Collector and Gateway using the files in `otel.zip`.

In each configuration, set the cluster selector value you plan to use:

- `cx.cluster.name = <your-cluster-name>`

Use the table below to complete each configuration in the family.

| Configuration type    | Required selectors                  | Configuration to paste   |
| --------------------- | ----------------------------------- | ------------------------ |
| **Agent**             | `cx.agent.type = agent`             | `agent.yaml`             |
| **Cluster Collector** | `cx.agent.type = cluster-collector` | `cluster-collector.yaml` |
| **Gateway**           | `cx.agent.type = gateway`           | `gateway.yaml`           |

If you enabled profiling during onboarding (chart `otel-integration` 0.8.0+), the integration also generates an `ebpf-profiler` configuration as an additional member of the family, with the selector `cx.agent.type = ebpf-profiler` and the corresponding `ebpf-profiler.yaml`. Add this configuration alongside the others to manage the eBPF profiler through Fleet Management.

If you enabled eBPF-based APM auto-instrumentation during onboarding, the integration also generates an `ebpf-instrumentation` configuration with the selector `cx.agent.type = ebpf-instrumentation` and the corresponding `ebpf-instrumentation.yaml`. This is [OpenTelemetry eBPF Instrumentation (OBI)](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation) — the eBPF-based APM agent that emits traces and RED metrics from your services without code changes. Add this configuration alongside the others to manage OBI through Fleet Management.

### Step 10: Save a configuration family version

Follow these steps to save and optionally activate the new version.

1. Select **Save** in the configuration editor.
1. (Optional) Select **Activate immediately** to apply the new version to all matching agents as soon as it is saved.
1. Select **Save** to create the new version.

The configuration group now includes the new configuration family version, and—if activation was selected—the Supervisor on each matching agent will pull and apply it.

### Step 11: Check configuration status

Verify that the configuration list loads and displays each configuration family with:

- Current state (Active or Inactive)
- Agent application status (Healthy, Warning, Error)
- Version information
