kind: Deployment
apiVersion: apps/v1
metadata:
  name: kafka-broker0
spec:
  replicas: 1
  selector:
    matchLabels:
        app: kafka
        id: "0"
  template:
    metadata:
      labels:
        app: kafka
        id: "0"
    spec:
      containers:
      - name: kafka
        image: wurstmeister/kafka #confluentinc/cp-server:latest
        ports:
        - containerPort: 31234
        - containerPort: 9092
        env:
        - name: KAFKA_ZOOKEEPER_CONNECT
          value: zoo1:2181
        - name: KAFKA_BROKER_ID
          value: "0"
        - name: KAFKA_LISTENERS
          value: OUTSIDE://:31234,INSIDE://:9092
        - name: KAFKA_ADVERTISED_LISTENERS
          value: INSIDE://:9092,OUTSIDE://kafka-service:31234
        - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
          value: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
        - name: KAFKA_INTER_BROKER_LISTENER_NAME
          value: INSIDE