<p>Is there a way to inherit annotations to all resources in a namespace?
My naive assumption was that I can annontate the namespace and that resources will get this annontation:</p>

<pre><code>kubectl get --export namespaces non-native  -o yaml
apiVersion: v1
kind: Namespace
metadata:
  annotations:
    foo: bar
  creationTimestamp: null
  name: non-native
  selfLink: /api/v1/namespaces/non-native
spec:
  finalizers:
  - kubernetes
status:
  phase: Active
</code></pre>

<p>Running</p>

<pre><code>kubectl get --export pod -n non-native nginx-6f858d4d45-s2xzl  -o yaml
</code></pre>

<p>shows no <code>foo=bar</code> annotations.</p>

<p>Am I asking for the impossible? Can you achieve this?</p>

<h3>update:</h3>

<p>Although my example shows a Pod, I would like to annotate also other resources, like services, or PVCs etc.</p>

<p>I think <code>podpreset</code> can help</p>

<pre><code>kind: PodPreset
apiVersion: settings.k8s.io/v1alpha1
metadata:
  annotations:
    foo: bar
  namespace: {youNamespace}
</code></pre>

<p>How enable <strong>PodPreset</strong>:</p>

<ol>
<li>You have enabled the api type <code>settings.k8s.io/v1alpha1/podpreset</code></li>
<li>You have enabled the admission controller PodPreset  </li>
<li>You have defined your pod presets</li>
</ol>
