• kubernetes: Get events across multiple objects

    4 min read

    kubernetes get events kubectl

    The most commonly used way to get events is by using kubectl describe on each object like this:

    $ kubectl describe pod pet2cattle-6597f8464d-hgxpp Name: pet2cattle-6597f8464d-hgxpp (...) Events:  Type Reason Age From Message  ---- ------ ---- ---- -------  Normal Scheduled 3m47s default-scheduler Successfully assigned kube-system/pet2cattle-6597f8464d-hgxpp to scopuli.lolcathost.systemadmin.es  Normal Pulled 3m46s kubelet Container image "172.18.1.46:5000/p2c:3.44" already present on machine  Normal Created 3m46s kubelet Created container pet2cattle-sitemap  Normal Started 3m46s kubelet Started container pet2cattle-sitemap  Normal Pulled 3m41s kubelet Container image "172.18.1.46:5000/p2c:3.44" already present on machine  Normal Created 3m41s kubelet Created container pet2cattle-indexer  Normal Started 3m40s kubelet Started container pet2cattle-indexer  Normal Pulled 3m32s kubelet Container image "172.18.1.46:5000/p2c:3.44" already present on machine  Normal Created 3m32s kubelet Created container pet2cattle  Normal Started 3m31s kubelet Started container pet2cattle  Warning Unhealthy 3m26s kubelet Liveness probe failed: Get http://10.42.0.8:8000/: net/http: request canceled (Client.Timeout exceeded while awaiting headers) 

    It's quite convenient when we are looking for events related to a given but becomes a pain if we need to see how the events are triggered on multiple objects.

    15/03/2021

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets