kafka

by KubeGems

Helm chartv7.1.0App 2.4.0

Kafka Cluster,this is a distributed streaming platform.

About this chart

Kafka

基于 bitnami kafka: https://github.com/bitnami/charts/tree/master/bitnami/kafka

Kafka是一个分布式流媒体平台,用于构建实时数据管道和流媒体应用。它具有水平可伸缩、容错、非常快的速度,并且可以在数千家公司的生产环境中运行。

安装

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install bitnami/kafka

需求

  • Kubernetes 1.12+
  • Helm 2.11+ or Helm 3.0-beta3+
  • PV provisioner support in the underlying infrastructure

参数

参数及默认值

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil
image.registryKafka image registrydocker.io
image.repositoryKafka Image namebitnami/kafka
image.tagKafka Image tag{VERSION}
image.pullPolicyKafka image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.debugSpecify if debug values should be setfalse
nameOverrideString to partially override kafka.fullname template with a string (will append the release name)nil
fullnameOverrideString to fully override kafka.fullname template with a stringnil
volumePermissions.enabledEnable init container that changes volume permissions in the data directory (for cases where the default k8s runAsUser and fsUser values do not work)false
volumePermissions.image.registryInit container volume-permissions image registrydocker.io
volumePermissions.image.repositoryInit container volume-permissions image namebitnami/minideb
volumePermissions.image.tagInit container volume-permissions image tagstretch
volumePermissions.image.pullPolicyInit container volume-permissions image pull policyAlways
volumePermissions.resourcesInit container resource requests/limitnil
updateStrategyUpdate strategy for the stateful setRollingUpdate
rollingUpdatePartitionPartition update strategynil
podDisruptionBudget.maxUnavailableMax number of pods down simultaneously1
replicaCountNumber of Kafka nodes1
configConfiguration file for Kafkanil
allowPlaintextListenerAllow to use the PLAINTEXT listener 明文传输true
listenersThe address the socket server listens on.nil
advertisedListenersHostname and port the broker will advertise to producers and consumers.nil
listenerSecurityProtocolMapThe protocol->listener mapping.nil
interBrokerListenerNameThe listener that the brokers should communicate on.nil
brokerIdID of the Kafka node-1
deleteTopicEnableSwitch to enable topic deletion or not.false
heapOptsKafka's Java Heap size. 堆大小-Xmx1024m -Xms1024m
logFlushIntervalMessagesThe number of messages to accept before forcing a flush of data to disk.10000
logFlushIntervalMsThe maximum amount of time a message can sit in a log before we force a flush.1000
logRetentionBytesA size-based retention policy for logs._1073741824
logRetentionCheckIntervalMsThe interval at which log segments are checked to see if they can be deleted.300000
logRetentionHoursThe minimum age of a log file to be eligible for deletion due to age.168
logSegmentBytesThe maximum size of a log segment file. When this size is reached a new log segment will be created._1073741824
logMessageFormatVersionLogging message format version.``
logsDirsA comma separated list of directories under which to store log files./bitnami/kafka/data
maxMessageBytesThe largest record batch size allowed by Kafka.1000012
defaultReplicationFactorDefault replication factors for automatically created topics1
offsetsTopicReplicationFactorThe replication factor for the offsets topic1
transactionStateLogReplicationFactor The replication factor for the transaction topic1
transactionStateLogMinIsr Overridden min.insync.replicas config for the transaction topic1
numIoThreadsThe number of threads doing disk I/O.8
numNetworkThreadsThe number of threads handling network requests.3
numPartitionsThe default number of log partitions per topic.1
numRecoveryThreadsPerDataDirThe number of threads per data directory to be used for log recovery at startup and flushing at shutdown.1
socketReceiveBufferBytesThe receive buffer (SO_RCVBUF) used by the socket server.102400
socketRequestMaxBytesThe maximum size of a request that the socket server will accept (protection against OOM)._104857600
socketSendBufferBytesThe send buffer (SO_SNDBUF) used by the socket server.102400
zookeeperConnectionTimeoutMsTimeout in ms for connecting to Zookeeper.6000
extraEnvVarsExtra environment variables to add to kafka podsnil
sslEndpointIdentificationAlgorithmThe endpoint identification algorithm to validate server hostname using server certificate.https
auth.enabledSwitch to enable the kafka authentication.false
auth.existingSecretName of the existing secret containing credentials for brokerUser, interBrokerUser and zookeeperUser.nil
auth.certificatesSecretName of the existing secret containing the certificate files that will be used by Kafka.nil
auth.certificatesPasswordPassword for the above certificates if they are password protected.nil
auth.brokerUserKafka client user.user
auth.brokerPasswordKafka client password.nil
auth.interBrokerUserKafka inter broker communication useradmin
auth.interBrokerPasswordKafka inter broker communication password.nil
auth.zookeeperUserKafka Zookeeper user.nil
auth.zookeeperPasswordKafka Zookeeper password.nil
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container1001
securityContext.runAsUserUser ID for the container1001
clusterDomainKubernetes cluster domaincluster.local
service.typeKubernetes Service typeClusterIP
service.portKafka port9092
service.nodePortKubernetes Service nodePortnil
service.loadBalancerIPloadBalancerIP for Kafka Servicenil
service.annotationsService annotations``
persistence.enabledEnable Kafka persistence using PVC, note that Zookeeper perisstency is unaffectedtrue
persistence.existingClaimProvide an existing PersistentVolumeClaim, the value is evaluated as a template.nil
persistence.storageClassPVC Storage Class for Kafka volumenil
persistence.accessModePVC Access Mode for Kafka volumeReadWriteOnce
persistence.sizePVC Storage Request for Kafka volume8Gi
persistence.annotationsAnnotations for the

Deploy kafka with OpenTenant

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