Hi @Alistair Mackay, could you pls give me a favor? I've found that there are nu . . .

Hi @Alistair Mackay, could you pls give me a favor?
I’ve found that there are number of ways to view events/ view logs. As a result, I would confuse when to use it. any order or tips for that?

  1. journalctl -u ...
  2. crictl logs ..<container_id>
  3. k describe..
  4. k logs ..
  5. kubectl logs <podname> --previous
  6. Any more??
    I guest it depends on 2 things
  7. Object running as service or pod
    a. To view logs = journalctl if object running as operating system service.
    b. kubectl logs: in case running as pod
    i. kubectl logs <podname> --previous Only view logs of a crashed/restarted
    c. or crictl logs, if kubectl does not response/working.
  8. Priority, Steps
    a. Firstly, check status, events (By using k describe to view State.Reason, LastState.Reason, Events)
    b. After that, view logs.

Events also help you debug issues with pods that never came up. So, events are from the k8s api server’s perspective, and logs give you the state of the apps that are running in the pod.

Alistair Mackay:
That is about it