Alleviating Confusion About The To Field In Network Policies
When solving a killercoda challenge I ran into some confusion. Even though my solution worked, there was a difference which I wanted to get clear on. I wrote this: apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: np namespace: space1 spec: podSelector: {} policyTypes: - Egress egress: - to: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: space2 - to: ports: - protocol: TCP port: 53 - protocol: UDP port: 53 But the provided course solution was this: ...