<p>I have a ValidatingWebhookConfiguration monitoring Pods which is working fine. I also have a MutatingWebhookConfiguration monitoring ( and eventually mutating ) Deployment Objects.  </p>

<p>I have both the Controllers written in Go. Pretty much the code for Mutating one  is a clone of the Validating one. </p>

<p>On the ValidatingWebhookConfiguration the triggering rule is :</p>

<pre><code> - operations: ["CREATE","UPDATE"]
   apiGroups: [""]
   apiVersions: ["v1"]
   resources: ["pods"]
</code></pre>

<p>It is getting triggered fine. </p>

<p>On the MutatingWebhookConfiguration the triggering rule is :</p>

<pre><code> - operations: ["CREATE","UPDATE"]
   apiGroups: [""]
   apiVersions: ["v1beta1"]
   resources: ["deployments"]
</code></pre>

<p>I am able to see that the webhook is getting started, but I am not getting it to trigger.</p>

<p>I have tried changing <code>v1beta1</code> to <code>extensions/v1beta1</code> and still have no luck.</p>

<p>Any ideas on what I am doing wrong ?</p>

<p>I would appreciate any help. </p>

<p>Thanks,</p>

<p>-Sreeni</p>

Sreeni
<p>If you want to take action on deployments, you need to specify the api group.
For deployments it is <code>apps</code>.
You can get a list of all resources in kubernetes and the according api groups with the following command:</p>

<pre><code>$ kubectl api-resources        
NAME                              SHORTNAMES   APIGROUP                       NAMESPACED   KIND
bindings                                                                      true         Binding
...
deployments                       deploy       apps                           true         Deployment
...
</code></pre>
