Small question regarding Kubernetes and how one pod can talk to another pod (two pods in total) when they are in one same namespace, hopefully without a very complex solution.
Setup:
I have one pod A, called juliette-waiting-for-romeo-tocall, which exposes a rest endpoint /romeo-please-call-me
Then, I have a second pod B, called romeo-wants-to-call-juliette, which codes does nothing but trying to make a call to juliette on the endpoint /romeo-please-call-me.
The pod juliette-waiting-for-romeo-tocall is not a complex pod exposed for the internet. This pod does not want any public internet call, does not want any other cluster to call, does not want any pods from different namespace to call. Juliette just want her Romeo which should be on the same namespace to call her.
Nonetheless, Romeo and Juliette are not yet engaged, they are not within one same pod, they don't use the side car pattern, does not share any volume, etc... They are really just two different pods under one same namespace so far.
What would be the easiest solution for Romeo to call Juliette please?
When I do kubectl get all, I do see:
NAME READY STATUS RESTARTS AGE
pod/juliette-waiting-for-romeo-tocall-7cc8b84cc4-xw9n7 1/1 Running 0 2d
pod/romeo-wants-to-call-juliette-7c765f6987-rsqp5 1/1 Running 0 1d
service/juliette-waiting-for-romeo-tocall ClusterIP 111.111.111.111 <none> 80/TCP 2d
service/romeo-wants-to-call-juliette ClusterIP 222.222.22.22 <none> 80/TCP 1d
So far, In Romeo's code, I tried a curl on the cluster IP address + port (in this fake example 111.111.111.111:80/romeo-please-call-me) But I am not getting anything back
What is the easier solution please?
Thank you