---
title: Charmhub | Deploy Apache Kafka Connect - K8s using Charmhub - The Open Operator
  Collection
description: Deploy the latest version of Apache Kafka Connect - K8s as a Kubernetes
  Operator on any cloud.
url: https://charmhub.io/kafka-connect-k8s/docs/t-setup-environment
---

# Apache Kafka Connect - K8s

[Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")

* [Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")

Platform:

4/stable 18

```
juju deploy kafka-connect-k8s --channel 4/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://github.com/canonical/kafka-connect-k8s-operator)

---

#### Contacts

##### Maintainers

+ [Canonical Data Platform](mailto:data-platform@lists.launchpad.net)

* [Submit a bug](https://github.com/canonical/kafka-connect-k8s-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

This is part of the [Charmed Apache Kafka Tutorial](https://charmhub.io/kafka-connect-k8s/docs/t-overview). Please refer to this page for more information and an overview of the content.

## [Setup the environment](https://charmhub.io/kafka-connect-k8s/docs/t-setup-environment#p-27779-setup-the-environment)

[Multipass](https://multipass.run/) is a quick and easy way to launch virtual machines running Ubuntu. It uses “[cloud-init](https://cloud-init.io/)” standard to install and configure all the necessary parts automatically.

Let’s install Multipass from [Snap](https://snapcraft.io/multipass) and launch a new VM using “[charm-dev](https://github.com/canonical/multipass-blueprints/blob/main/v1/charm-dev.yaml)” cloud-init config:

```
sudo snap install multipass && \
multipass launch --cpus 4 --memory 8G --disk 50G --name my-vm charm-dev
```

*Note: See all `multipass launch` parameters in the [launch command documentation](https://multipass.run/docs/launch-command)*.

Multipass [list of commands](https://multipass.run/docs/multipass-cli-commands) is short and self-explanatory, e.g. show all running VMs:

```
multipass list
```

As soon as the new VM starts, enter:

```
multipass shell my-vm
```

*Note: if at any point you’d like to leave Multipass VM, use `Ctrl+D` or type `exit`*.

All the parts have been pre-installed inside VM already, like MicroK8s, LXD and Juju (the files `/var/log/cloud-init.log` and `/var/log/cloud-init-output.log` contain all low-level installation details).
Also, the image already comes with two Juju controllers already setup, one for LXD and one for MicroK8s

```
$ juju list-controllers
Use --refresh option with this command to see the latest information.

Controller  Model     User   Access     Cloud/Region         Models  Nodes    HA  Version
lxd*        tutorial  admin  superuser  localhost/localhost       2      1  none  3.1.5
microk8s    -         admin  superuser  microk8s/localhost        1      1     -  3.1.5
```

Make sure that you use the controller bound to the MicroK8s cluster, e.g.:

```
juju switch microk8s
```

The Juju controller can work with different models; models host applications such as Charmed Apache Kafka K8s. Set up a specific model for Charmed Apache Kafka K8s named `tutorial`:

```
juju add-model tutorial
```

You can now view the model you created above by entering the command `juju status` into the command line. You should see the following:

```
Model     Controller  Cloud/Region        Version  SLA          Timestamp
tutorial  microk8s    microk8s/localhost  3.1.5    unsupported  15:46:55+02:00

Model "admin/tutorial" is empty.
```

---
