What is the difference between these ports sections in a egress in Network Polic . . .

Edith Puclla:
What is the difference between these ports sections in a egress in Network Police yaml?
I know is the dash, but what does exactly mean? :slightly_smiling_face:

 - ports:                  
    - port: 53                
      protocol: UDP
    - port: 53                
      protocol: TCP

and

  ports:                  
    - port: 53                
      protocol: UDP
    - port: 53                
      protocol: TCP

Hinodeya:
It’s the list @Edith Puclla so the first item in the list is indicated by - :wink: and so on for another new item in the list in this case you have a dictionnary(map) and the list into it

Hinodeya:
Deeper explanation there https://stackoverflow.com/questions/58764509/why-container-object-in-pod-yaml-file-has-list-value-rather-than-a-map-value

Edith Puclla:
@Sangeetha Radhakrishnan I know that it is a list, I mean if this restricts nod to ports or considers both.

Edith Puclla:
Thank you do the link :wink:

Hinodeya:
it has nothing to do @Edith Puclla you manage your access with podselecor with label binding to hit or namespaceselector make this excercice for better understanding https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy/

Edith Puclla:
yay, thanks