apiVersion: v1
kind: ReplicationController
metadata:
  labels:
    app: kafka
    component: kafka-broker
  name: kafka-broker
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: kafka
        component: kafka-broker
    spec:
      containers:
      - name: kafka
        image: cloudtrackinc/kubernetes-kafka:latest
        ports:
        - containerPort: 9092
        env:
          - name: ENABLE_AUTO_EXTEND
            value: "true"
          - name: KAFKA_RESERVED_BROKER_MAX_ID
            value: "999999999"
          - name: KAFKA_AUTO_CREATE_TOPICS_ENABLE
            value: "false"
          - name: KAFKA_PORT
            value: "9092"
          - name: KAFKA_ADVERTISED_PORT
            value: "9092"
          - name: KAFKA_ADVERTISED_HOST_NAME
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
          - name: KAFKA_ZOOKEEPER_CONNECT
            value: kafka-zoo-svc:2181
          - name: KAFKA_CREATE_TOPICS
            value: demo-topic:16:1