In question 2 of Mock exam 2, your solution suggest to create cilium network policy like this
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: p1
namespace: team-azure
spec:
endpointSelector:
matchLabels:
type: messenger
egressDeny:
- toEndpoints:
- matchLabels:
type: database
But there is no label like type=database in databse-pod in team-azure in namespace.
I guess the right solutions would be
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: "p1"
namespace: "team-azure"
spec:
endpointSelector:
matchLabels:
type: messenger
egressDeny:
- toEndpoints:
- matchLabels:
role: database
Please let me know if my understanding is correct