Created
March 26, 2025 15:19
-
-
Save id/4ab4442d3f406b36728bb8d9063550db to your computer and use it in GitHub Desktop.
emqx in k8s with kafka config example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps.emqx.io/v2beta1 | |
kind: EMQX | |
metadata: | |
name: emqx | |
spec: | |
image: emqx/emqx-enterprise:5.6.0 | |
config: | |
data: | | |
log.console.level = debug | |
connectors { | |
kafka_producer { | |
cloud { | |
authentication { | |
mechanism = plain | |
username = kafka_username | |
password = "file:///mounted/kafka/password.txt" | |
} | |
bootstrap_hosts = "localhost:9092" | |
ssl {enable = true, verify = verify_peer} | |
} | |
} | |
} | |
actions { | |
kafka_producer { | |
cloud { | |
connector = cloud | |
enable = true | |
parameters { | |
message { | |
key = "${.clientid}" | |
timestamp = "${.timestamp}" | |
value = "${.}" | |
} | |
topic = "emqx" | |
} | |
} | |
} | |
} | |
coreTemplate: | |
spec: | |
replicas: 3 | |
extraVolumes: | |
- name: kafka-creds | |
secret: | |
secretName: kafka-creds | |
extraVolumeMounts: | |
- name: kafka-creds | |
mountPath: /mounted/kafka | |
dashboardServiceTemplate: | |
enabled: true | |
spec: | |
type: LoadBalancer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: kafka-creds | |
type: Opaque | |
stringData: | |
password.txt: | | |
password123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment