I am using Azure kubernetes service(managed servcie). kubectl get events -namespace abc
says there are no resources
.
I used get the events all the time, on the same cluster and suddenly it returns there are no resources. Can some one help out?
Remark: This is a cluster which is currently having lots of traffic and should have events.
Have a look at Timeline of kubernetes events. Events seem to be retained only a certain amount of time, so maybe there are no events in the particular namespace. Also as 4c74356b41 suggest check kube-system
ns you most probably will see events.
probably means there no events. Now I see only 1 event in kube-system namespace. You will most likely see some events in that namespace:
kubectl get events -n kube-system
which will confirm everything is fine.
Try deleting some pod, then check for
kubectl get events -w
in that namespace, you will get some events, so likely when you were checking, there was no event going on. Both the Control Plane components and the Kubelet emit events to the API server as they perform actions like pod creation, deletion, replica set creation, hpa etc