apiVersion: v1
kind: Pod
metadata:
  name: testpod-fluentbit-kafka
  namespace: default
spec:
  containers:
  - name: kafkacat
    image: solsson/kafkacat@sha256:1266d140c52cb39bf314b6f22b6d7a01c4c9084781bc779fdfade51214a713a8
    command:
      - bash
      - -ec
      - >
        cd /usr/local/bin;
        echo '#!/bin/bash' > logs-cat;
        chmod +x logs-cat;
        echo "kafkacat -b kafka-0.broker.kafka.svc.cluster.local:9092 -C -t fluent-bit -o end" >> logs-cat;

        echo "Won't cat logs to stdout because it would create an infinite loop of log aggregation.";
        echo "Instead run something like:";
        echo "kubectl -n default exec -ti testpod-fluentbit-kafka -- logs-cat";
        tail -f /dev/null;
