1
votes
  1. I have 5 microservices in 5 pods and have deployed each service using specific port using NODE PORT service.
  2. I have a UI app as one service inside another pod which is also exposed using node port service.

Since I can't use pod IP to access urls in UI app as pods live and die so deployed as nodeport service and can I access all 5 services inside UI app seamlessly using respective node port?

Please advise - is this approach going to be reliable?

1

1 Answers

3
votes
  1. Yes, you can connect to those Node port services seamlessly.

But remember, you may need higher network bandwidth card and connection (to master nodes) if you get too much traffic to these services.

Also if you have a few master nodes, you can try dedicated master node-ip and nodeport for a service.(If you have 5 master nodes, each service is accessed from one master node's IP etc. This is not mandatory, you can connect to each service using any masterIP:nodeport)

Highly recommend to use load-balancer service for this. If you have baremetal cluster try using MetalLB.

Edit : (after Nagappa LM`s comment)

  1. If its for QA, then no need to worry, but if they perform load test to all the services simultaneously could be a problematic.
  2. Your code change means, only your k8 - deployment is changed, not Kubernetes service. k8 service is where you define nodeport