---
title: Charmhub | Deploy Capsule using Charmhub - The Open Operator Collection
description: Deploy the latest version of Capsule as a Kubernetes Operator on any
  cloud.
url: https://charmhub.io/capsule-k8s/docs/contributing
---

# Capsule

[Clastix Labs](https://charmhub.io/publisher/clastixlabs "View all packages from Clastix Labs")

* [Clastix Labs](https://charmhub.io/publisher/clastixlabs "View all packages from Clastix Labs")

Platform:

stable 1

```
juju deploy capsule-k8s
```

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

---

#### Relevant links

* [Homepage](https://github.com/clastix/capsule-k8s-charm)

---

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

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

The code for this charm can be downloaded as follows:

```
git clone https://github.com/clastix/capsule-k8s-charm
```

## Setup

A typical setup using [snaps](https://snapcraft.io/), for deployments to a [microk8s](https://microk8s.io/) cluster can be done using the following commands.

Install the dependencies:

```
sudo snap install juju --classic
sudo snap install microk8s --classic
microk8s.enable dns storage
```

Create a controller named `micro` into the cloud `microk8s`:

```
juju bootstrap microk8s micro
```

In Juju, you interact with the client (the `juju` command on your local machine). It connects to a controller. The controller is hosted on a cloud and controls models.

```
juju add-model capsule-system
```

Then you build and deploy this charm into the model you just created:

```
charmcraft build
juju deploy --trust ./charm-k8s-capsule.charm --resource capsule-image=clastix/capsule:v0.1.1
```

To check it you run:

```
juju status
```

## Development

Create and activate a `virtualenv` with the development requirements:

```
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements-dev.txt
```

Now build the charm again and upgrade it through `juju`:

```
charmcraft build
juju upgrade-charm --path="./charm-k8s-capsule.charm" charm-k8s-capsule --force-units
```

Alternatively, you can completely clean up the environment:

```
juju remove-application charm-k8s-capsule --force --no-wait
juju destroy-model capsule-system --destroy-storage --force --no-wait
juju destroy-controller micro --destroy-all-models
```

---
