Skip to content

Instantly share code, notes, and snippets.

@tmckayus
Created October 8, 2019 18:05
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 tmckayus/31ef27b18314178c6c40f09391da6362 to your computer and use it in GitHub Desktop.
Save tmckayus/31ef27b18314178c6c40f09391da6362 to your computer and use it in GitHub Desktop.
Search OpenShift logs on crc when you're out of ideas

Pro-tip on searching OpenShift logs in crc when you're out of ideas

To search quickly for content in the OpenShift logs across all pods and namespaces, enter a debug shell and grep in /var/log. This can be a handy way to search for errors when you're not quite sure what's going on with your application, you've already examined pods and events to no avail, and you don't know where to turn. Be warned, though, the output may be voluminous, so it helps to have some clue what you're looking for.

$ oc debug node/crc-vsqrt-master-0
Starting pod/crc-vsqrt-master-0-debug ...
To use host binaries, run `chroot /host`
If you don't see a command prompt, try pressing enter.
sh-4.2# chroot /host
sh-4.4# cd /var/log
sh-4.4# grep -r mypodname .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment