<p>If I have a projects structured as:</p>
<pre><code>- project/
  - deployment.yaml
  - kustomization.yaml
- bases/
  - transformer.yaml
  - kustomization.yaml
</code></pre>
<p><code>project/kustomization.yaml</code>:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
  - ../bases
patchesStrategicMerge:
 - deployment.yaml
</code></pre>
<p><code>bases/kustomization.yaml</code>:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
transformers:
  - transformer.yaml
</code></pre>
<p>If I then do <code>kubectl kustomize</code>, then the transformer does not get applied.</p>
<p>However if I do this:</p>
<pre><code>- project/
  - kustomization.yaml
  - transformer.yaml
  - deployment.yaml
</code></pre>
<p><code>project/kustomization.yaml</code>:</p>
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
patchesStrategicMerge:
 - deployment.yaml
transformers:
 - transformer.yaml
</code></pre>
<p>Then the transformer works and applies as expected.</p>
<p>To be clear, there aren't any errors with the first way, it just doesn't apply the transformer whereas the second way does apply the transformer. Is there a way I can lay out the directory structure the first way?</p>

Joey Stout
<p><a href="https://github.com/kubernetes-sigs/kustomize/issues/2408" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/kustomize/issues/2408</a></p>
<p>This appears to be by design which honestly makes sense. Theres no way to apply this transformation outside the directory.</p>
