# Docker

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* At least 1Gb of memory
* Two available Kafka API compatible Clusters

### Configure K2K <a href="#configure-hq" id="configure-hq"></a>

To run K2K, you need to provide a YAML configuration file that defines your replication pipeline. This file tells K2K how to move and transform your data.

First, create your replication pipeline definition in a YAML file. For example, let's say you name it `pipeline.yaml`. This file describes the specifics of your data replication.

### Running K2K <a href="#configure-hq" id="configure-hq"></a>

To run K2K as a Docker container, ensure you have your `pipeline.yaml` file ready. Navigate to the directory containing the `pipeline.yaml` file and execute the following command. This command will mount your configuration file into the container and set up the required environment variables for K2K and OpenTelemetry.

{% code title="terminal" %}

```bash
docker run --rm -it \
  -v "$(pwd):/pipelines" \
  -e K2K_PIPELINE_FOLDER="/pipelines" \
  -e OTEL_SERVICE_NAME="k2k" \
  -e OTEL_METRICS_EXPORTER=console \
  -e OTEL_TRACES_EXPORTER=none \
  -e OTEL_LOGS_EXPORTER=none \
  --name k2k \
  lensesio/k2k:1.0.0 \
  k2k start -f /pipelines/pipeline.yaml -t
  
  
```

{% endcode %}

> **Warning:** OTEL traces and logs are not supported for now.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lenses.io/latest/k2k/1.2/install/docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
