When a service runs in several clusters, say one per region, a problem rarely shows up in just one. You want every replica's logs, from every cluster, in one place and in order. kubectl logs reads from one context at a time.
With kubectl
Within one cluster, a label selector gets every Pod of a workload:
kubectl --context prod-us-east -n shop logs -l app=checkout \
--all-containers --prefix --timestamps -f --max-log-requests 10
--prefix labels each line with its Pod and container, and --max-log-requests raises the default limit of 5 concurrent streams. For several clusters, run one per context and label the lines:
for ctx in prod-us-east prod-eu-west; do
kubectl --context "$ctx" -n shop logs -l app=checkout \
--all-containers --prefix --timestamps -f --max-log-requests 10 |
sed "s/^/[$ctx] /" &
done
wait
It works, with limits:
- Lines arrive in whatever order the streams deliver them, not in time order across clusters.
-fwith a selector follows the Pods that existed when it started. Pods created later, during a rollout or after a crash, aren't picked up; you have to restart the command.- Searching, filtering by level or exporting means piping through
grep,jqand friends, and starting over for each new question.
With Klystiq
- Open the clusters: Klystiq reads your existing kubeconfig, and every list shows all open contexts together.
- On the Pods or Deployments page, filter to the workload, for example
checkout. You'll see its rows from every cluster, each with its context. - Select the rows and press l.
You get one combined, time-ordered stream of every container of every matching Pod, and it follows new Pods as they start.
- Search finds, filters or excludes lines, with case and regex options.
- Filter by level, Pod or container. Levels are detected in JSON, logfmt, klog, Logback and Python formats.
- Export what's shown as text, JSON or CSV.
- Select lines and copy them, or ask the AI assistant about them if you've turned it on.
When a container writes faster than the view can keep up, Klystiq slows the stream rather than dropping lines, and it keeps the latest 100,000 lines.
Find what changed
Logs tell you what's failing; the Timeline tells you what changed just before. It merges events and changes from every open cluster into one list, so a rollout in one region and a container restarting in another sit side by side. See Timeline, topology and metrics.
The Logs and terminals docs cover every option.