What's the difference between these two specs in my ingress resource. Do they perform the same thing? When do I use which type?
spec:
rules:
- host: {{ .Values.Subdomain }}{{ .Values.Domain }}
http:
paths:
- path: /api
backend:
serviceName: {{ .Values.ServiceName }}
servicePort: 80
And:
spec:
rules:
- host: {{ .Values.Subdomain }}{{ .Values.Domain }}
http:
paths:
- backend:
serviceName: {{ .Values.ServiceName }}
servicePort: 80
path: /api
These two specifications are the same in YAML - the order of items is not relevant.
There is no difference. The paths
field is a list of maps(dictionary), where each map consists of path
and backend
field. Within a map, the order of fields doesn't matter which is the case in your two templates.