rest – Information sharing between two kubernetes services

I have 2 REST API services running on the same kubernetes cluster- service A and service B. Service A needs some information stored by service B in etcd. What is the best way to fetch that information?

I am evaluating 3 options-

  1. Service A invokes a service B REST API to get this required information – since the services are already REST API servers, this is easy.

  2. Service A invokes a service B gRPC API to get this information – since the services are running on the same cluster, gRPC will be more efficient than REST API.

  3. Service A directly accesses the information updated by service B in etcd – can this be done?

Read more here: Source link