Kubectl get events says there are no resources

2/11/2019

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.

-- krishna m
azure-aks
kubectl
kubernetes

3 Answers

10/17/2019

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.

-- papanito
Source: StackOverflow

2/11/2019

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.

-- 4c74356b41
Source: StackOverflow

10/17/2019

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

-- Tushar Mahajan
Source: StackOverflow