title: Using Lists or triple dashes to put multiple Kubernetes objects in one YAML file: purely a stylistic choice?
body: <p><code>List</code> API objects and triple dashes (<code>---</code>) can both be used to denote multiple objects in a single YAML file. Therefore, why do Lists exist when triple dashes accomplish the same thing (in my opinion) in a cleaner way? Are there any cases in which a List would be preferred over triple dashes, or is this purely a stylistic choice?</p>
  
  <p>For example, these two YAML files both produce the same two <code>ServiceAccount</code> objects (chosen for brevity):</p>
  
  <p>my-serviceaccounts1.yaml</p>
  
  <pre><code>apiVersion: v1
  kind: List
  metadata: {}
  items:
  - apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: my-app
  - apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: my-other-app
  </code></pre>
  
  <p>my-serviceaccounts2.yaml</p>
  
  <pre><code>apiVersion: v1
  kind: ServiceAccount
  metadata:
    name: my-app
  ---
  apiVersion: v1
  kind: ServiceAccount
  metadata:
    name: my-other-app
  </code></pre>