List the consumer groups:
#kubectl -n kafka exec -ti my-cluster-kafka-0 -- bin/kafka-consumer-groups.sh --bootstrap-server my-cluster-kafka-bootstrap.kafka:9092 --list
Delete a consumer group:
Bring down dispatcher and controller, if any.
#kubectl -n knative-eventing scale deployment kafka-ch-dispatcher --replicas=0
#kubectl -n knative-eventing scale deployment kafka-ch-controller --replicas=0
Now remove the group by name:
kubectl -n kafka exec -ti my-cluster-kafka-0 -- bin/kafka-consumer-groups.sh --bootstrap-server my-cluster-kafka-bootstrap.kafka:9092 --delete --group kafka.dx-test.default-kne-trigger.05719b03-3117-4633-b504-dc4020423ce0
Delete all consumer groups:
kubectl -n kafka exec -ti my-cluster-kafka-0 -- bin/kafka-consumer-groups.sh --bootstrap-server my-cluster-kafka-bootstrap.kafka:9092 --delete --all-groups
Describe a consumer group:
#kubectl -n kafka exec -ti my-cluster-kafka-0 -- bin/kafka-consumer-groups.sh --bootstrap-server my-cluster-kafka-bootstrap.kafka:9092 --describe --group kafka.dx-test.default-kne-trigger.3a796074-afb6-4862-a5f3-0db6c76b41d0
#xargs -0 -n 1 kubectl -n kafka exec -ti my-cluster-kafka-0 -- bin/kafka-consumer-groups.sh --bootstrap-server my-cluster-kafka-bootstrap.kafka:9092 --describe --group < <(tr \\n \\0 <consumer-grps-dangling-2.txt)
No comments:
Post a Comment