Skip to content

Instantly share code, notes, and snippets.

@jcantrill
Created July 25, 2018 13:08
Show Gist options
  • Save jcantrill/149f952c1d63df73cc9d2ff6d51b31be to your computer and use it in GitHub Desktop.
Save jcantrill/149f952c1d63df73cc9d2ff6d51b31be to your computer and use it in GitHub Desktop.
Get the logs of the fluent pods
#!/bin/bash
pod=${1:-}
if [ -z "${pod}" ]; then
pod=$(oc get pods -l component=fluentd -o jsonpath={.items[*].metadata.name})
fi
for p in ${pod}; do
echo ">>>>>>>><<<<<<<<<<<<<"
echo " ${p}"
echo ">>>>>>>><<<<<<<<<<<<<"
oc logs $p
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment