Skip to content

Instantly share code, notes, and snippets.

@jboyd01
Created December 20, 2018 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jboyd01/c167733eca96cace9a91d64ab2225961 to your computer and use it in GitHub Desktop.
Save jboyd01/c167733eca96cace9a91d64ab2225961 to your computer and use it in GitHub Desktop.
script to pull all service catalog pod logs
#!/bin/bash
for p in $(oc get pods -n kube-service-catalog -o name -l app=apiserver); do
pod=$(sed -e 's/pod\///g'<<<$p)
oc logs $pod -c apiserver -n kube-service-catalog > /tmp/artifacts/$pod.log
done
for p in $(oc get pods -n kube-service-catalog -o name -l app=controller-manager); do
pod=$(sed -e 's/pod\///g'<<<$p)
oc logs $pod -n kube-service-catalog > /tmp/artifacts/$pod.log
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment