Pipe logs that contain ISO8601-type logs into a relative 'ago' format.
Completely generated by ChatGPT4.
Using a recent version of Go in your path:
go build pipestamp.go
chmod +x pipestamp
sudo mv pipestamp /usr/local/binkubectl logs --tail 2 etcd-x-x-x | pipestamp
...
{"level":"info","ts":"53 seconds ago","caller":"etcdserver/server.go:2422","msg":"saved snapshot","snapshot-index":}
{"level":"info","ts":"53 seconds ago","caller":"etcdserver/server.go:2452","msg":"compacted Raft logs","compact-index":}