Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenShift and hostnetwork=true

I have deployed two POD-s with hostnetwork set to true. When the POD-s are deployed on same OpenShfit node then everything works fine since they can discover each other using node IP.

When the POD-s are deployed on different OpenShift nodes then they cant discover each other, I get no route to host if I want to point one POD to another using node IP. How to fix this?

like image 270
dplesa Avatar asked Nov 07 '22 15:11

dplesa


1 Answers

The uswitch/kiam (https://github.com/uswitch/kiam) service is a good example of a use case.

it has an agent process that runs on the hostnetwork of all worker nodes because it modifies a firewall rule to intercept API requests (from containers running on the host) to the AWS api.

it also has a server process that runs on the hostnetwork to access the AWS api since the AWS api is on a subnet that is only available to the host network.

finally... the agent talks to the server using GRPC which connects directly to one of the IP addresses that are returned when looking up the kiam-server.

so you have pods of the agent deployment running on the hostnetwork of node A trying to connect to kiam server running on the hostnetwork of node B.... which just does not work.

furthermore, this is a private service... it should not be available from outside the network.

like image 183
Jeremy Kassis Avatar answered Nov 15 '22 09:11

Jeremy Kassis