I need to find out the history of network policies on a namespace.
kubectl get networkpolicy shows only available ones.
Is there any command that I can see deleted network policies?
I need to find out the history of network policies on a namespace.
kubectl get networkpolicy shows only available ones.
Is there any command that I can see deleted network policies?
This answer is not limited to network policies. In the Kubernetes cluster, if you want to see the logs for any resource creation, update, or deletion, you can find them in the audit logs. You can read more about audit logs here.
Note/Limitations:
hello world) clusters, you need to enable them.audit logs also rotate, so if you are trying to find details of some event that happened way back then, the logs will be lost due to rotation.