Zookeeper K8s
- By Canonical Data Platform
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 10 | 09 Mar 2022 | |
latest/beta | 8 | 08 Jun 2021 | |
latest/edge | 21 | 12 Apr 2023 | |
3/stable | 51 | 27 Feb 2024 | |
3/candidate | 51 | 27 Feb 2024 | |
3/beta | 51 | 27 Feb 2024 | |
3/edge | 56 | 24 Apr 2024 |
juju deploy zookeeper-k8s --channel latest/beta
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
This Juju Charmed Operator is implemented using the Charmed Operator Framework, designed to deploy a standard OCI (e.g. Docker) ZooKeeper image alongside a sidecar container containing the Juju operator logic.
A non-sidecar version of this charm is also available on the Charmhub.
Developing
Create and activate a virtualenv with the development requirements:
$ git clone https://github.com/openstack-charmers/charm-zookeeper-k8s
$ cd charm-zookeeper-k8s/
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install -r requirements-dev.txt
Testing
The Python operator framework includes a very nice harness for testing operator behaviour without full deployment. Just run_tests
:
$ ./run_tests
Deploying from source
$ charmcraft pack
$ juju deploy ./zookeeper-k8s.charm -n 3 --resource zookeeper-image=zookeeper
Where:
-
-n
: the number of Juju units to deploy, i.e. the number of wanted k8s pods. Any number>= 1
is supported but for production you should pick an odd number>= 3
. -
zookeeper-image
: OCI (e.g. Docker) ZooKeeper image. Usezookeeper
for the latest image from DockerHub.