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
参数
参数及默认值
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry | nil |
global.imagePullSecrets | Global Docker registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
global.storageClass | Global storage class for dynamic provisioning | nil |
image.registry | Kafka image registry | docker.io |
image.repository | Kafka Image name | bitnami/kafka |
image.tag | Kafka Image tag | {VERSION} |
image.pullPolicy | Kafka image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
image.debug | Specify if debug values should be set | false |
nameOverride | String to partially override kafka.fullname template with a string (will append the release name) | nil |
fullnameOverride | String to fully override kafka.fullname template with a string | nil |
volumePermissions.enabled | Enable 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.registry | Init container volume-permissions image registry | docker.io |
volumePermissions.image.repository | Init container volume-permissions image name | bitnami/minideb |
volumePermissions.image.tag | Init container volume-permissions image tag | stretch |
volumePermissions.image.pullPolicy | Init container volume-permissions image pull policy | Always |
volumePermissions.resources | Init container resource requests/limit | nil |
updateStrategy | Update strategy for the stateful set | RollingUpdate |
rollingUpdatePartition | Partition update strategy | nil |
podDisruptionBudget.maxUnavailable | Max number of pods down simultaneously | 1 |
replicaCount | Number of Kafka nodes | 1 |
config | Configuration file for Kafka | nil |
allowPlaintextListener | Allow to use the PLAINTEXT listener 明文传输 | true |
listeners | The address the socket server listens on. | nil |
advertisedListeners | Hostname and port the broker will advertise to producers and consumers. | nil |
listenerSecurityProtocolMap | The protocol->listener mapping. | nil |
interBrokerListenerName | The listener that the brokers should communicate on. | nil |
brokerId | ID of the Kafka node | -1 |
deleteTopicEnable | Switch to enable topic deletion or not. | false |
heapOpts | Kafka's Java Heap size. 堆大小 | -Xmx1024m -Xms1024m |
logFlushIntervalMessages | The number of messages to accept before forcing a flush of data to disk. | 10000 |
logFlushIntervalMs | The maximum amount of time a message can sit in a log before we force a flush. | 1000 |
logRetentionBytes | A size-based retention policy for logs. | _1073741824 |
logRetentionCheckIntervalMs | The interval at which log segments are checked to see if they can be deleted. | 300000 |
logRetentionHours | The minimum age of a log file to be eligible for deletion due to age. | 168 |
logSegmentBytes | The maximum size of a log segment file. When this size is reached a new log segment will be created. | _1073741824 |
logMessageFormatVersion | Logging message format version. | `` |
logsDirs | A comma separated list of directories under which to store log files. | /bitnami/kafka/data |
maxMessageBytes | The largest record batch size allowed by Kafka. | 1000012 |
defaultReplicationFactor | Default replication factors for automatically created topics | 1 |
offsetsTopicReplicationFactor | The replication factor for the offsets topic | 1 |
transactionStateLogReplicationFactor | The replication factor for the transaction topic | 1 |
transactionStateLogMinIsr | Overridden min.insync.replicas config for the transaction topic | 1 |
numIoThreads | The number of threads doing disk I/O. | 8 |
numNetworkThreads | The number of threads handling network requests. | 3 |
numPartitions | The default number of log partitions per topic. | 1 |
numRecoveryThreadsPerDataDir | The number of threads per data directory to be used for log recovery at startup and flushing at shutdown. | 1 |
socketReceiveBufferBytes | The receive buffer (SO_RCVBUF) used by the socket server. | 102400 |
socketRequestMaxBytes | The maximum size of a request that the socket server will accept (protection against OOM). | _104857600 |
socketSendBufferBytes | The send buffer (SO_SNDBUF) used by the socket server. | 102400 |
zookeeperConnectionTimeoutMs | Timeout in ms for connecting to Zookeeper. | 6000 |
extraEnvVars | Extra environment variables to add to kafka pods | nil |
sslEndpointIdentificationAlgorithm | The endpoint identification algorithm to validate server hostname using server certificate. | https |
auth.enabled | Switch to enable the kafka authentication. | false |
auth.existingSecret | Name of the existing secret containing credentials for brokerUser, interBrokerUser and zookeeperUser. | nil |
auth.certificatesSecret | Name of the existing secret containing the certificate files that will be used by Kafka. | nil |
auth.certificatesPassword | Password for the above certificates if they are password protected. | nil |
auth.brokerUser | Kafka client user. | user |
auth.brokerPassword | Kafka client password. | nil |
auth.interBrokerUser | Kafka inter broker communication user | admin |
auth.interBrokerPassword | Kafka inter broker communication password. | nil |
auth.zookeeperUser | Kafka Zookeeper user. | nil |
auth.zookeeperPassword | Kafka Zookeeper password. | nil |
securityContext.enabled | Enable security context | true |
securityContext.fsGroup | Group ID for the container | 1001 |
securityContext.runAsUser | User ID for the container | 1001 |
clusterDomain | Kubernetes cluster domain | cluster.local |
service.type | Kubernetes Service type | ClusterIP |
service.port | Kafka port | 9092 |
service.nodePort | Kubernetes Service nodePort | nil |
service.loadBalancerIP | loadBalancerIP for Kafka Service | nil |
service.annotations | Service annotations | `` |
persistence.enabled | Enable Kafka persistence using PVC, note that Zookeeper perisstency is unaffected | true |
persistence.existingClaim | Provide an existing PersistentVolumeClaim, the value is evaluated as a template. | nil |
persistence.storageClass | PVC Storage Class for Kafka volume | nil |
persistence.accessMode | PVC Access Mode for Kafka volume | ReadWriteOnce |
persistence.size | PVC Storage Request for Kafka volume | 8Gi |
persistence.annotations | Annotations 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkafka is pinned at v7.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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