Home > Software engineering >  [RESOLVED]Is there a way to capture the history of logs in Kubernetes?
[RESOLVED]Is there a way to capture the history of logs in Kubernetes?

Time:12-15

When getting the logs of a kubernetes node we use kubectl get logs -lapp=default-agent -f This starts streaming logs from the current time, is there any way to capture the history? If not, how are big corporations so fast in doing hot fixes, if there is no log history?

CodePudding user response:

Use --since=<duration> parameter, see documentation.

For example kubectl get logs -lapp=default-agent --since=1h

how are big corporations so fast in doing hot fixes, if there is no log history

Big corporations are using enterprise solutions such as Splunk, ELK, Loki, ...

You should get more familiar with logging architecture in k8s

  • Related