<p>Is there a way to trigger an external API whenever a Kubernetes namespace is getting deleted. Are there any post and pre hooks for namespace deletion/creation.</p>

<p>Or are there any way to handle it using any other Kubernetes resource except Pod</p>

Ysak
<p>You can have a <a href="https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/" rel="nofollow noreferrer">webhook</a> to perform any task/operation that you want to do. When a a request to delete a namespace comes to kubernetes API server the webhook will be called by kubernetes API server automatically. A webhook is an http/https endpoint to a running piece of software which could be running in the Kubernetes cluster itself or somewhere else. A webhook need to be registered to Kubernetes API server to be able receive the request from the API server. </p>
