<p>What's the difference between these two specs in my ingress resource. Do they perform the same thing? When do I use which type?</p>

<pre><code>spec:
  rules:
  - host: {{ .Values.Subdomain }}{{ .Values.Domain }}
    http:
      paths:
        - path: /api
          backend:
            serviceName: {{ .Values.ServiceName }}
            servicePort: 80
</code></pre>

<p>And:</p>

<pre><code>spec:
  rules:
  - host: {{ .Values.Subdomain }}{{ .Values.Domain }}
    http:
      paths:
      - backend:
          serviceName: {{ .Values.ServiceName }}
          servicePort: 80
        path: /api
</code></pre>

binaryguy
<p>There is no difference. The <code>paths</code> field is a list of maps(dictionary), where each map consists of <code>path</code> and <code>backend</code> field. Within a map, the order of fields doesn't matter which is the case in your two templates.</p>
