<p>I am new to Kubernetes, I am looking to see if its possible to hook into the container execution life cycle events in the orchestration process so that I can call an API to pass the details of the container and see if its allowed to execute this container in the given environment, location etc.</p>
<p>An example check could be: container can only be run in a Europe or US data centers. so before someone tries to execute this container, outside this region data centers, it should not be allowed.</p>
<p>Is this possible and what is the best way to achieve this?</p>

<p>You can possibly set up an <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#imagepolicywebhook" rel="nofollow noreferrer">ImagePolicy</a> admission controller in the clusters, were you describes from what registers it is allowed to pull images.</p>

<p><a href="https://github.com/flavio/kube-image-bouncer" rel="nofollow noreferrer">kube-image-bouncer</a> is an example of an ImagePolicy admission controller</p>

<blockquote>
  <p>A simple webhook endpoint server that can be used to validate the images being created inside of the kubernetes cluster.</p>
</blockquote>
