<p>I would like to deploy a bunch of yaml files <a href="https://github.com/quay/quay/tree/master/deploy/k8s" rel="nofollow noreferrer">https://github.com/quay/quay/tree/master/deploy/k8s</a> on my kubernetes cluster and would like to know, what is the best approach to deploy these at once.</p>

<p>You can directly apply folder</p>

<pre><code>kubectl create -f ./&lt;foldername&gt;

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

<p>You can also add mutiliple files in one command</p>

<pre><code>kubectl apply -f test.yaml,test-1.yaml
</code></pre>

<p>You can also merge all YAML files into a single file and manage it further.</p>

<p>Marge YAML file using <code>---</code></p>

<p>For example :</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: test-data
  labels:
    app: test-data
spec:
  ports:
  - name: http
    port: 80
    targetPort: 9595
  - name: https
    port: 9595
    targetPort: 9595
  selector:
    app: test-data
    tier: frontend
---
apiVersion: v1
kind: Service
metadata:
  name: test-app
  labels:
    app: test-app
spec:
  ports:
  - name: http
    port: 80
    targetPort: 9595
  - name: https
    port: 9595
    targetPort: 9595
  selector:
    app: test-app
    tier: frontend
</code></pre>
