Last active
February 28, 2025 01:51
-
-
Save mersonff/fbc5b01d318ec43c7e8f2a69ce0d273b to your computer and use it in GitHub Desktop.
Kafka deployment Kubernets
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/v1 | |
kind: Deployment | |
metadata: | |
name: kafka-depl # Nome do Deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: kafka | |
template: | |
metadata: | |
labels: | |
app: kafka | |
spec: | |
containers: | |
- name: kafka | |
image: bitnami/kafka:3.5.1 | |
env: | |
- name: KAFKA_CFG_ZOOKEEPER_CONNECT | |
value: "zookeeper-srv:2181" | |
- name: KAFKA_CFG_BROKER_ID | |
value: "1" | |
- name: KAFKA_CFG_LISTENERS | |
value: "PLAINTEXT://:9092" | |
- name: KAFKA_CFG_ADVERTISED_LISTENERS | |
value: "PLAINTEXT://kafka-srv:9092" | |
- name: ALLOW_PLAINTEXT_LISTENER | |
value: "yes" | |
ports: | |
- containerPort: 9092 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: kafka-srv | |
spec: | |
selector: | |
app: kafka | |
ports: | |
- name: client | |
protocol: TCP | |
port: 9092 | |
targetPort: 9092 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment