> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/devx/5.5/user-guide/cli/applications/kafka-connectors.md).

# Kafka Connectors

The CLI can create, modify, pause, restart and remove Apache Kafka Connect connectors.

{% hint style="info" %}
Kafka Connect cluster permissions will be applied to the operation.
{% endhint %}

## View connectors <a href="#view-connectors" id="view-connectors"></a>

List the currently deployed connectors, optionally filter by name, cluster and namespace:

```bash
lenses-cli connectors --cluster-name="dev" 

#[[--names [--unwrap]]
```

The `--names` flag displays only the names of the connectors. When used with `--unwrap`, it will print each connector name on a separate line in the output.

## List all the supported connectors <a href="#list-all-the-supported-connectors" id="list-all-the-supported-connectors"></a>

```bash
lenses-cli connectors --supported
```

## View the available plugins per cluster <a href="#view-the-available-plugins-per-cluster" id="view-the-available-plugins-per-cluster"></a>

```bash
lenses-cli connectors plugins --cluster-name="dev"
```

## Create connectors <a href="#create-connectors" id="create-connectors"></a>

```bash
lenses-cli connector create \
    --cluster-name="dev" \
    --name="connectorName" \
    --configs="{\"key\": \"value\"}"
```

From a file:

```bash
lenses-cli connector create ./connector.yaml
```

Example file:

```yaml
clusterName: development
config:
  connector.class: "org.apache.kafka.connect.file.FileStreamSinkConnector"
  file: "/dev/null"
  tasks.max: "1"
  topics: "reddit_posts"
  name: "nullsink"
```

## Update a connector <a href="#update-a-connector" id="update-a-connector"></a>

```bash
# Inline
lenses-cli connector update --name=nullsink --cluster-name=dev \
  --configs="{\"connector.class\":\"org.apache.kafka.connect.file.FileStreamSinkConnector\",\"file\":\"/dev/null\",\"name\":\"nullsink\",\"tasks.max\":\"8\",\"topics\":\"reddit_posts\"}"

# or from file
lenses-cli connector update ./connector.yaml
```

## View the configuration of a connector <a href="#view-the-configuration-of-a-connector" id="view-the-configuration-of-a-connector"></a>

```bash
lenses-cli connector config \
    --cluster-name="dev" \
    --name="connectorName"
```

## View the status of a connector <a href="#view-the-status-of-a-connector" id="view-the-status-of-a-connector"></a>

```bash
lenses-cli connector status \
    --cluster-name="dev" \
    --name="connectorName"
```

## Pause a connector <a href="#pause-a-connector" id="pause-a-connector"></a>

```bash
lenses-cli connector pause \
    --cluster-name="dev" \
    --name="connectorName"
```

## Resume a connector <a href="#resume-a-connector" id="resume-a-connector"></a>

```bash
lenses-cli connector resume \
    --cluster-name="dev" \
    --name="connectorName"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.lenses.io/latest/devx/5.5/user-guide/cli/applications/kafka-connectors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
