<p>As mentioned above, I want to merge multiple deployment yaml files in k8s into one yaml file, but because of the project, I can't use the separator &quot;---&quot;.</p>

<p>You can use a list:</p>
<pre><code>apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: ConfigMap
  metadata:
    name: cm1
- apiVersion: v1
  kind: ConfigMap
  metadata:
    name: cm2

$ kubectl apply -f list.yaml
configmap/cm1 created
configmap/cm2 created
</code></pre>
