kafka-operator

by joaquinito2051

Helm chartv0.25.1App v0.25.1

kafka-operator manages Kafka deployments on Kubernetes

About this chart

Koperator chart

The Koperator is a Kubernetes operator to deploy and manage Apache Kafka resources for a Kubernetes cluster.

Prerequisites

  • Kubernetes 1.15.0+

Installing the chart

Before installing the chart, you must first install the Koperator CustomResourceDefinition resources. This is performed in a separate step to allow you to easily uninstall and reinstall Koperator without deleting your installed custom resources.

kubectl create --validate=false -f https://github.com/banzaicloud/koperator/releases/download/v0.25.1/kafka-operator.crds.yaml

To install the chart:

$ helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
$ helm install kafka-operator --create-namespace --namespace=kafka banzaicloud-stable/kafka-operator

To install the operator using an already installed cert-manager

$ helm install kafka-operator --set certManager.namespace=<your cert manager namespace> --namespace=kafka  --create-namespace banzaicloud-stable/kafka-operator

Upgrading the chart

To upgrade the chart since the helm 3 limitation you have to set a value as well to keep your CRDs. If this value is not set your CRDs might be deleted.

helm upgrade kafka-operator --set crd.enabled=true --namespace=kafka banzaicloud-stable/kafka-operator

Uninstalling the Chart

To uninstall/delete the kafka-operator release:

$ helm delete --purge kafka-operator

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Banzaicloud Kafka Operator chart and their default values.

ParameterDescriptionDefault
operator.image.repositoryOperator container image repositoryghcr.io/banzaicloud/kafka-operator
operator.image.tagOperator container image tagv0.25.1
operator.image.pullPolicyOperator container image pull policyIfNotPresent
operator.serviceAccount.nameServiceAccount used by the operator podkafka-operator
operator.serviceAccount.createIf true, create the operator.serviceAccount.name service accounttrue
operator.resourcesCPU/Memory resource requests/limits (YAML)Memory: 128Mi/256Mi, CPU: 100m/200m
operator.namespacesList of namespaces where Operator watches for custom resources.Note that the operator still requires to read the cluster-scoped Node labels to configure rack awareness. Make sure the operator ServiceAccount is granted get permissions on this Node resource when using limited RBACs."" i.e. all namespaces
operator.annotationsOperator pod annotations can be set{}
prometheusMetrics.enabledIf true, use direct access for Prometheus metricsfalse
prometheusMetrics.authProxy.enabledIf true, use auth proxy for Prometheus metricstrue
prometheusMetrics.authProxy.serviceAccount.createIf true, create the service account (see prometheusMetrics.authProxy.serviceAccount.name) used by prometheus auth proxytrue
prometheusMetrics.authProxy.serviceAccount.nameServiceAccount used by prometheus auth proxykafka-operator-authproxy
prometheusMetrics.authProxy.image.repositoryAuth proxy container image repositorygcr.io/kubebuilder/kube-rbac-proxy
prometheusMetrics.authProxy.image.tagAuth proxy container image tagv0.13.0
prometheusMetrics.authProxy.image.pullPolicyAuth proxy container image pull policyIfNotPresent
rbac.enabledCreate rbac service account and rolestrue
imagePullSecretsImage pull secrets can be set[]
replicaCountOperator replica count can be set1
alertManager.enableAlertManager can be enabledtrue
alertManager.permissivePeerAuthentication.createPermissive PeerAuthentication (Istio resource) for AlertManager can be createdtrue
nodeSelectorOperator pod node selector can be set{}
tolerationsOperator pod tolerations can be set[]
affinityOperator pod affinity can be set{}
nameOverrideRelease name can be overwritten""
crd.enabledWhether to enable CRD installation(used for upgrade only)false
fullnameOverrideRelease full name can be overwritten""
certManager.namespaceOperator will look for the cert manager in this namespacecert-manager
certManager.enabledOperator will integrate with the cert managerfalse
webhook.enabledOperator will activate the admission webhooks for custom resourcestrue
webhook.certs.generateHelm chart will generate cert for the webhooktrue
webhook.certs.secretHelm chart will use the secret name applied here for the certkafka-operator-serving-cert
additionalEnvAdditional Environment Variables[]
additionalSidecarsAdditional Sidecars Configuration[]
additionalVolumesAdditional volumes required for sidecars[]

Deploy kafka-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kafka-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkafka-operator is pinned at v0.25.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply