CMAK operator is a set of tools packaged as Helm chart, that allows to install and configure CMAK (previously Kafka Manager) into Kubernetes cluster.
CMAK (previously Kafka Manager) is well-known and mature tool for monitoring and managing Apache Kafka clusters.
CMAK operator creates
Kubernetes Jobs
for configuring CMAK.
Kubernetes Jobs are not automatically garbage collected.
To enable cleanup it is required to enable TTLAfterFinished
feature gate.
CMAK operator could be installed only with Helm 3. Helm chart is published to public Helm repository, hosted on GitHub itself.
It’s recommended to install CMAK operator into a dedicated namespace.
$ helm repo add cmak https://eshepelyuk.github.io/cmak-operator
$ helm repo update
$ helm install --create-namespace -n cmak-ns mycmak cmak/cmak-operator
$ helm search repo cmak-operator --versions
NAME CHART VERSION APP VERSION DESCRIPTION
cmak/cmak-operator 0.2.1 3.0.0.5 CMAK operator for K8S.
cmak/cmak-operator 0.2.0 3.0.0.5 CMAK operator for K8S.
$ helm install --create-namespace -n cmak-ns --version 0.2.1 mycmak cmak/cmak-operator
❗
|
Exposing CMAK UI
Currently, CMAK operator doesn’t create neither |
The simpliest test is to port forward CMAK UI HTTP port and access it from browser .
$ kubectl port-forward -n cmak-ns service/cmak 9000:9000
Then, open http://localhost:9000 in your browser.
It’s extremely easy to configure multiple clusters in CMAK, starting from cluster setup, connection settings and ending with authorization using Helm values files.
Check CMAK operator values for all available options and their description.
-
Minimal values.yaml configuration for adding a several Kafka clusters to CMAK.
cmak: clusters: - name: "cluster-stage" curatorConfig: zkConnect: "kafka01.stage:2181,kafka02.stage:2181" - name: "cluster-prod" curatorConfig: zkConnect: "kafka01.prod:2181,kafka02.prod:2181,kafka03.prod:2181"
Connection settings could be configured for all clusters at once or per dedicated cluster.
-
Configuring connection settings
cmak: commonClusters: curatorConfig: zkMaxRetry: 100 # (1) clusters: - name: "cluster-stage" kafkaVersion: "2.5.0" # (2) curatorConfig: zkConnect: "kafka01.stage:2181,kafka02.stage:2181" - name: "cluster-prod" kafkaVersion: "2.1.0" # (3) curatorConfig: zkConnect: "kafka01.prod:2181,kafka02.prod:2181,kafka03.prod:2181"
-
this setting is applied to both clusters.
-
applied only to
cluster-stage
. -
applied only to
cluster-prod
.
Configuration should be passed to helm via command line during installation or upgrade.
$ helm install --create-namespace -n cmak-ns -f cmak-values.yaml mycmak cmak/cmak-operator
CMAK operator comprises following components:
-
CMAK, powered by Docker image from @hleb-albau.
-
Apache ZooKeeper, powered by official Docker image.
-
K8S Job used to configure Kafka clusters, powered by custom Docker image.