Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes: How do we List all objects modified in N days in a specific namespace?

We have multiple people ( with admin access ) doing the deployments in kubernetes cluster. We are finding it difficult to manage who has modified which object.

We can control the access and privileges using RBAC with roles and role bindings. We are planning to implement well defined roles and rolebindings for different groups.

We would also want to list all objects modified in N days in a specific namespace. Is there a way to display the objects using kubectl? please let me know

like image 414
P Ekambaram Avatar asked Oct 16 '25 11:10

P Ekambaram


1 Answers

This probably can't be done easily just with kubectl.

But you might look into Kubernetes auditing. It causes the API server to record all requests to the API, and you can query them in different ways. For example, it should be possible to query the audit logs for all the objects that have been specified in the last N days.

like image 151
weibeld Avatar answered Oct 19 '25 09:10

weibeld