Stern is a utility that allows you to specify both pod and container id as regular expressions.
Installation with Mac:
brew install stern
Tail pod logs starting with my-pods-
in the default
namespace:
stern -n default my-pods
Tail the same, but only for the web
container:
stern -n default my-pods --container web
Do the same but only from 1 minute ago:
stern -n default my-pods --container web --since 1m