Why does my GKE cluster not show any events?

7/22/2020

I have a GKE cluster and deployed some workloads on it. What I noticed is that whenever I do kubectl get events --all-namespaces, I don't see any results. kubectl describe deployment <name> doesn't show any events either. I'm pretty sure things do happen in my cluster because all my workloads are running fine and Stackdriver is able to report logs and HPA functions perfectly. But my events section is empty all over. Why is this? Is this something I've to enable manually in GKE?

-- Rajshri Mohan K S
google-cloud-platform
google-kubernetes-engine
kubernetes
kubernetes-pod

1 Answer

7/22/2020

Kubernetes events are retained by default a period of 1 hour which is controlled by kube-apiserver. You would not have performed any activity in an hour.

check event-ttl here , code here

Also you can check this merge request for latest enhancements in kubectl events here

-- Tarun Khosla
Source: StackOverflow