zookeeper

by CloudPirates

Helm chartv0.15.6App 3.9.7Apache-2.0Verified publisher

Apache ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.

About this chart

Zookeeper Helm Chart

Apache ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.

Quick Start

Prerequisites

  • Kubernetes 1.24+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure (if persistence is enabled)

Installation

Installing the Chart

To install the chart with the release name my-zookeeper:

helm install my-zookeeper oci://registry-1.docker.io/cloudpirates/zookeeper

To install with custom values:

helm install my-zookeeper oci://registry-1.docker.io/cloudpirates/zookeeper -f my-values.yaml

Or install directly from the local chart:

helm install my-zookeeper ./charts/zookeeper

The command deploys Zookeeper on the Kubernetes cluster in the default configuration. The Configuration section lists the parameters that can be configured during installation.

Security & Signature Verification

This Helm chart is cryptographically signed with Cosign to ensure authenticity and prevent tampering.

Public Key:

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5U+rM2d3hDjgP5T3cLShuuQIU9vR
Z4/G+Nug6q5vRa+C3qUA1wXjbaJFAfcIrv5VjmYAYOj13shnPpp3Zh4fnQ==
-----END PUBLIC KEY-----

To verify the helm chart before installation, copy the public key to the file cosign.pub and run cosign:

cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/zookeeper:<version>

Getting Started

  1. Connect to ZooKeeper from inside the cluster:
kubectl run zk-client --rm --tty -i --restart='Never' \
    --image zookeeper:latest -- bash

# Inside the pod:
zkCli.sh -server my-zookeeper:2181

Configuration

Global parameters

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]

Image Configuration

ParameterDescriptionDefault
image.registryZooKeeper image registrydocker.io
image.repositoryZooKeeper image repositoryzookeeper
image.tagZooKeeper image tag3.9.4@sha256:2408ba6f6eb91a4dbf65548428b90f9e5e9cf9d77e5f280a4bf80270d465a80f
image.imagePullPolicyZooKeeper image pull policyAlways

Common Parameters

ParameterDescriptionDefault
nameOverrideString to partially override fullname""
fullnameOverrideString to fully override fullname""
namespaceOverrideString to override the namespace for all resources""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
replicaCountNumber of ZooKeeper replicas to deploy3
podDisruptionBudget.enabledCreate a Pod Disruption Budget to ensure high availability during voluntary disruptionstrue
podDisruptionBudget.minAvailableminAvailable for Pod Disruption Budget. Value is not mandatory.""
podDisruptionBudget.maxUnavailableminAvailable for Pod Disruption Budget. Value is not mandatory.""
networkPolicy.enabledEnable network policiestrue
commandOverride default container command (useful when the default entrypoint needs to be replaced)[]

ZooKeeper Configuration

ParameterDescriptionDefault
zookeeperConfig.tickTimeZooKeeper tick time2000
zookeeperConfig.initLimitZooKeeper init limit10
zookeeperConfig.syncLimitZooKeeper sync limit5
zookeeperConfig.electionPortBindRetryZooKeeper election port bind retry10
zookeeperConfig.maxClientCnxnsZooKeeper max client connections60
zookeeperConfig.standaloneEnabledEnable standalone mode"false"
zookeeperConfig.adminServerEnabledEnable admin server"false"
zookeeperConfig.commandsWhitelist4-letter word commands whitelistsrvr
zookeeperConfig.customServersCustom zoo.cfg server lines. When set, generated server.N entries are replaced by these values[]
zookeeperConfig.autopurge.purgeIntervalAutopurge purge interval (hours)24
zookeeperConfig.autopurge.snapRetainCountAutopurge snapshot retain count3
zookeeperConfig.admin.enableServerEnable the admin server"false"
zookeeperConfig.admin.serverPortAdmin server port8080
zookeeperConfig.admin.serverAddressAdmin server address0.0.0.0
zookeeperConfig.admin.idleTimeoutAdmin server connection idle timeout (milliseconds)30000
zookeeperConfig.admin.commandUrlAdmin server command URL/commands
zookeeperConfig.extraConfigsExtra ZooKeeper configuration lines appended to zoo.cfg[]

Metrics

ParameterDescriptionDefault
metrics.enabledEnable Prometheus metrics exportertrue
metrics.service.typeMetrics service typeClusterIP
metrics.service.ports.portMetrics service port7000
metrics.service.annotationsAdditional custom annotations for Metrics service{}
metrics.service.labelsAdditional labels for metrics service{}
metrics.serviceMonitor.enabledCreate ServiceMonitor resource(s) for scraping metrics using Prometheus Operatorfalse
metrics.serviceMonitor.namespaceNamespace in which to create ServiceMonitor resource(s)""
metrics.serviceMonitor.intervalInterval at which metrics should be scraped10s
metrics.serviceMonitor.scrapeTimeoutTimeout after which the scrape is ended""
metrics.serviceMonitor.relabelingsAdditional relabeling of metrics[]
metrics.serviceMonitor.metricRelabelingsAdditional metric relabeling of metrics[]
metrics.serviceMonitor.honorLabelsHonor metrics labelsfalse
metrics.serviceMonitor.selectorPrometheus instance selector labels{}
metrics.serviceMonitor.annotationsAdditional custom annotations for the ServiceMonitor{}
metrics.serviceMonitor.namespaceSelectorNamespace selector for ServiceMonitor{}

Service Configuration

ParameterDescriptionDefault
service.typeKubernetes service typeClusterIP
service.trafficDistributionKubernetes service traffic distribution""
service.ports.clientZooKeeper client service port2181
service.ports.secureClientTLS client port. Set to null to disable (default). When set, also configure SSL via zookeeperConfig.extraConfigs and mount keystore files with extraVolumes/extraVolumeMounts. Setting the port without SSL config will cause startup failure.null
service.ports.quorumZooKeeper quorum service port2888
service.ports.leaderElectionZooKeeper leader election service port3888
service.ports.adminZooKeeper admin service port8080
service.annotationsAdditional annotations to add to the service{}

External Access

ParameterDescriptionDefault
externalAccess.enabledEnable per-pod external LoadBalancer services for client access from outside the clusterfalse
externalAccess.service.typeKubernetes service type for external access servicesLoadBalancer
externalAccess.service.portExternal client port exposed on each LoadBalancer2181
externalAccess.service.annotationsAnnotations applied to each external service (e.g. AWS NLB settings){}
externalAccess.service.loadBalancerIPsStatic LoadBalancer IP per replica; list length must match replicaCount[]
externalAccess.service.loadBalancerSourceRangesSource CIDR ranges allowed to reach the external LoadBalancers[]
externalAccess.service.externalTrafficPolicyExternal traffic policy for LoadBalancer/NodePort services (Local recommended for per-pod LBs)Local
externalAccess.service.labelsExtra labels applied to each external service{}
externalAccess.service.hostnameDomainExtra annotation external-dns.alpha.kubernetes.io/hostname per replica: {release}-{ordinal}.{domain}. Requires External-DNS with that zone in domainFilters""

When enabled, the chart creates one external service per ZooKeeper pod (e.g. release-zookeeper-0-external). Clients outside the cluster should use the LoadBalancer hostnames and client port in their connection string. Quorum traffic remains on the internal headless service; zoo.cfg server entries are not changed.

Example for AWS NLBs:

externalAccess:
  enabled: true
  service:
    hostnameDomain: int.example.com
    annotations:
      service.beta.kubernetes.io/aws-load-balancer-type: "external"
      service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"
      service.beta.kubernetes.io/aws-load-balancer-scheme: "internal"
      service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: "preserve_client_ip.enabled=true"

Use aws-load-balancer-scheme internal if clients are in the VPC, internet-facing if they're on the public internet.

Persistence

| Parameter | Desc

Deploy zookeeper with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has zookeeper 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 chartzookeeper is pinned at v0.15.6 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