<pre><code>overlays -----&gt; configuration1 ----&gt; kustomization.yaml 
         |   
         |----&gt; configuration2 ----&gt; kustomization.yaml


</code></pre>

<pre><code>resources ------&gt; kustomization.yaml

# in file resources/kustomization.yaml
# for configuration1 
resources:
  - pvc.yaml
  - deployment.yaml
  - namespace.yaml

# for configuration2
resources:
  - pvc.yaml
  - network.yaml
  - istio.yaml
</code></pre>

<p>end goal</p>

<pre><code>kubectl apply -k overlays/configuration1
kubectl apply -k overlays/configuration2

</code></pre>

<p>I have an overlays folder that contains two folders. configuration1 and configuration2. In those folders I have a kustomization.yaml file. These two kustomization files call the same resource folder. configuration1 and configuration2 need to have a different list of resources specified. Can I create two different kustomize.yaml files in the resource folder or is there anyway to specify two different list of resources in the same kustomization.yaml? </p>

<p>In this case it would use the following structure:</p>
<pre><code>base/
  kustomization.yaml
  pvc.yaml
overlays/
  configuration1/
    kustomization.yaml
    deployment.yaml
    namespace.yaml
  configuration2/
    kustomization.yaml
    network.yaml
    istio.yaml
</code></pre>
<p><code>base/kustomization.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>resources:
  - pvc.yaml
</code></pre>
<p><code>overlays/configuration1/kustomization.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>resources:
  - ../../base
  - namespace.yaml
  - deployment.yaml
</code></pre>
<p><code>overlays/configuration2/kustomization.yaml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>resources:
  - ../../base
  - network.yaml
  - istio.yaml
</code></pre>
<p>The idea is to keep in the base the configuration that is common to both and move to each overlay the configuration specific to it.</p>
