How to find k8s namespace delete history

6/15/2020

A namespace is deleted and all containers in the namespace are lost. I run command history | grep delete, but didn't get any namespace delete history.

Could anyone help find the delete reason? Thanks!

-- Jiongjiong Li
kubernetes
namespaces

1 Answer

6/15/2020

If you have enabled auditing of all requests to Kubernetes API Server on the kubernetes cluster then you could find out who submitted the delete request to delete the namespace and when.Audting is a recommended best practice to find out this kind of information in a production cluster.

-- Arghya Sadhu
Source: StackOverflow