Skip to main content
View container and application logs for your pods.

Basic Usage

Outputs the most recent log entries from the pod.

Flags

Searching

-n reads back the tail of the journal, so an error from a while ago falls off the end. -g searches the whole journal instead: it returns the last -n entries that match, however far back they are.
Three things to know about the search:
  • The pattern is a regex (PCRE), matched against the message text — error|fatal, 5\d\d, user_id=42 all work. Quote it so your shell doesn’t expand it first.
  • Case follows the pattern. An all-lowercase pattern matches case-insensitively; one uppercase character makes it case-sensitive. So -g error finds Error and ERROR, while -g Error finds only Error.
  • Matches print newest first, the opposite order to an unfiltered read.
A search covers every service, including the ones the preset default hides. That is deliberate: an unfiltered instapods logs my-app on a Node.js pod reads the app unit, but the kernel’s OOM-killer lines and nginx’s 502s live in other units — exactly the things you search for because you can’t see them. Add -s to scope a search to one service. -- No entries -- means the search ran and nothing matched.

Examples

Service Filters

The available service filters depend on the pod’s preset: If you’ve installed database services, their logs are also available: