Kubernetes: error building connection between pod to pod when `hostNetwork=true` is enabled

68 Views Asked by At

Hope this is complicated network connection.

  1. Where I have a pod(srsRan) which acts as a bridge for pod(amf) and a hardware(usrp-with in the network). I have a deployment (srsRan) where I enabled hostnetwork=true. This build the connection with hardware while this can not build connection to another pod, where log is given after an image(amf-for data packet transmission). This is because hostNetwork removes access to the CNI(I believe, this is the reason it is not allowing to build network/connection). I also tried by adding network policy and service. No use. the scenario is explain in this image. enter image description here

Error log from pod(amf):

07/13 10:24:58.549: [amf] INFO: gNB-N2 accepted[IP_ADDR]:55885 in ng-path module (../src/amf/ngap-sctp.c:113)
07/13 10:24:58.549: [amf] INFO: gNB-N2 accepted[IP_ADDR] in master_sm module (../src/amf/amf-sm.c:733)
07/13 10:24:58.550: [amf] INFO: [Added] Number of gNBs is now 1 (../src/amf/context.c:1175)
07/13 10:24:58.550: [amf] INFO: gNB-N2[IP_ADDR] max_num_of_ostreams : 30 (../src/amf/amf-sm.c:772)
07/13 10:25:16.307: [amf] INFO: gNB-N2[IP_ADDR] connection refused!!! (../src/amf/amf-sm.c:785)
07/13 10:25:16.307: [amf] INFO: [Removed] Number of gNBs is now 0 (../src/amf/context.c:1202)

  1. Also, if I removed/disabled hostNetwork=false, I can able to build connection with another pod (amf) since the cni enables the connection. But not able to establish a connection with Hardware.

Any leads will be appreciated to tackle this situation,

0

There are 0 best solutions below