Interpod communication with network policies help

Hi,

I have a question regarding inter pod communication with network policies. This was something I saw in one of my CKAD practice exams and wasn’t sure how to go about doing it.

Without giving too many specific details the question was something along the lines of:

“You have rolled out a new pod (call it C) to your infrastructure and now you need to allow it to communicate with the pods A and B but nothing else. Given the running pod C edit it to use a network policy that will allow it to send and receive traffic only to and from pods A and B.”

The question provided the network policies already and didn’t allow you to modify them in any way.

So my question is how would I go about leveraging these already created network policies and attach them to C so that pod C can communicate only with A and B?

Thanks!