💻 Tech
Just looking at kubectl logs can be painful. One way is to colorize it and make it searchable (i.e., you can search for text).
- Install ccze: https://github.com/cornet/ccze
- Query your logs (with or without timestamps), pipe the result to
cczeto highlight the log and to use ANSI color sequences (i.e., the-Aarg), then pipe it tolessso you can query to the logs (i.e.,/somekey) or navigate to them (i.e.,kfor up). See example below.
kubectl logs some-pod-name --timestamps | ccze -A | less