Show pod logs newer than a relative time like 10s, 5m, or 1h

kubectl logs

  • Show logs for containers in a pod.
    More information: <https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#logs>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

kubectl logs --since={{relative_time}} {{pod_name}}

click the source code to copy install kubectl logs on any operating system with command-not-found.com