<p>I am writing an ansible playbook right now that deploys a dockerized application in kubernetes.  However, for molecularity purposes I would rather not hard code the files that need to be apply after doing <code>kompose convert -f docker-compose.yaml --volumes hostPath</code>  Is there a way to apply all the files in a directory?</p>

<p>You can apply all files in a folder with</p>

<pre><code>kubectl apply -f &lt;folder&gt; 
</code></pre>

<p>You may also be interested in <em>parameterization</em> of your manifest files using <a href="https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/" rel="noreferrer">Kustomize</a> e.g. use more replicas in a prod-namespace than in a test-namespace. You can apply parameterized manifest files with</p>

<pre><code>kubectl apply -k &lt;folder&gt;
</code></pre>
