#  kubectl -n kafka run kafka-producer -ti --image=quay.io/strimzi/kafka:0.27.1-kafka-3.0.0 --rm=true --restart=Never -- bin/kafka-console-producer.sh --broker-list my-cluster-kafka-bootstrap:9092 --topic my-topic
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: producer-deploy
  name: producer-deploy
  namespace: kafka
spec:
  replicas: 1
  selector:
    matchLabels:
      app: producer-deploy
  strategy: {}
  template:
    metadata:
      labels:
        app: producer-deploy
    spec:
      containers:
      - image: quay.io/strimzi/kafka:0.27.1-kafka-3.0.0
        name: kafka-producer

        #command: ["/bin/sh"]
        #args: ["-c", "while true; do echo hello; sleep 10;done"]
      
        command: ["/bin/sh"]
        args: ["-c", "while true; do date | /opt/kafka/bin/kafka-console-producer.sh --broker-list my-cluster-kafka-bootstrap:9092 --topic my-topic; sleep 10;done"]

        resources:
          requests:
            memory: "32Mi"
            cpu: "20m"
          limits:
            memory: "128Mi"
            cpu: "500m"
status: {}

