Consul syncCatalog discovering targetPort of K8s services


We use the Consul syncCatalog for syncing all our K8s services to Consul and use the Consul APIs (with Watchers) to discover service information in the code. This works fine with dynamic addition/removal of K8s services etc. Most of our application microservices discover each other and start communicating.

For external traffic, we create LoadBalancer services or ClusterIP services with externalIPs. We have transport microservices, that discover these services and use this information to create listening sockets. For such services, there is a requirement to have the port and targetPort different, in which case, the transport microservices need to retrieve the targetPort of the service. Do the Consul APIs provide this information?