Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I tail logs in open shift using oc client

Tags:

openshift

From the question you can tell I'm a newb.

At the moment to get the logs of my pod I'm doing a ...

oc logs -f api-myapp-v1-48-cdrs2

This shows me everything in the log. How can I tail them instead?

Also I was wodering if someone could point me out to a nice cheat sheet of open shift commands? One that is good for beginners.

thanks

like image 335
Richie Avatar asked Jul 24 '17 04:07

Richie


1 Answers

Use the --tail option.

oc logs api-myapp-v1-48-cdrs2 --tail=50

You can use the --help option to commands to find out what options they accept.

For some hands on exercises to help you learn OpenShift, see:

  • https://learn.openshift.com
like image 60
Graham Dumpleton Avatar answered Sep 20 '22 19:09

Graham Dumpleton