YAML file doubs

Hello, I have a doubt regarding a lecture. I was checking the service-definition.yml file in the kubernetes services lecture, and in one chapter appears as: spec: type: NodePort ports: -targetPort: 80 port: 80 nodePort: 80 And then I see it in the demo like: spec: type: NodePort ports: - port:80 targetPort: 80 nodePort: 80 I thought that “ports” was an array in yaml and in that case the order of the list of elements matter. Could you explain me if that’s ok please?

Hi @Gabs,

The order doesn’t matter, It’s a list of key & value store so you can write the order that want.