Skip to content
Prev Previous commit
Next Next commit
Quite interesting way to test a command from yaml - see it in logs
  • Loading branch information
solsson committed Jul 27, 2017
commit 8c99e813c2c0e42a6192e061d43723eb5dc5bfef
4 changes: 3 additions & 1 deletion addon-events/events-kube-kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ spec:
- /bin/bash
- -ec
- >
echo '
curl
--cacert /run/secrets/kubernetes.io/serviceaccount/ca.crt
--header "Authorization: Bearer $(cat /run/secrets/kubernetes.io/serviceaccont/token)"
--header "Authorization: Bearer $(cat /run/secrets/kubernetes.io/serviceaccount/token)"
https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT/api/v1/watch/events
|
kafkacat
-b kafka-0.broker.kafka.svc.cluster.local:9092,kafka-1.broker.kafka.svc.cluster.local:9092,kafka-2.broker.kafka.svc.cluster.local:9092
-t ops-kube-events-all-json-001
-P
'; tail -f /dev/null