You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,25 @@ By default, the base filename is going to be printed as a prefix for each tailed
53
53
54
54
To suppress the prefix, run the command with `FS_PREFIX=0`.
55
55
56
+
### Tail container logs from Kubernetes
57
+
58
+
The kubelet with K3s will create log files for containers in `/var/log/containers` with long prefixes, the `FS_PREFIX=k8s` env-var can be used to redact the string.
59
+
60
+
Any text passed after the folder forms a grep for the filenames, so here, we are only looking at "queue-worker" containers.
61
+
62
+
Note that these files do not receive a "WRITE" fsnotify event, only an initial "CREATE".
2025/03/12 07:39:23 Attaching to: queue-worker-6b579d58d7-krgx5_openfaas_queue-worker-08e45f83b4f6edbd9ae2182f6709ccfb28e3e5871b5cc0d303c20c4c7b2a3d56.log
68
+
2025/03/12 07:39:23 Attaching to: queue-worker-6b579d58d7-krgx5_openfaas_queue-worker-f03309cc46a9752a4366062da18872ee215cc1837dcb335fa0d339948f3d9609.log
69
+
queue-worker-6b579d58d7-krgx5| 2025-03-10T12:40:45.84048421Z stderr F 2025-03-10T12:40:45.838Z info jetstream-queue-worker/main.go:118 JetStream queue-worker {"version": "0.3.46", "gitCommit": "8320975de6c98c8b6ef6781e2db610cc389c7e33"}
70
+
queue-worker-6b579d58d7-krgx5| 2025-03-10T12:40:45.840510746Z stderr F 2025-03-10T12:40:45.838Z info jetstream-queue-worker/main.go:120 Licensed to: Alex Ellis
71
+
queue-worker-6b579d58d7-krgx5| 2025-03-10T12:40:45.840514335Z stderr F
72
+
queue-worker-6b579d58d7-krgx5| 2025-03-10T12:40:45.840517017Z stderr F 2025-03-10T12:40:45.839Z info metrics/metrics.go:79 Starting metrics server on port 8081
0 commit comments