Service registration

I am able to register a service with HTTP Api catalog which is not there in reality and it gets register. How can I map a service to actual service? Am I missing a concept here? Thanks

Hi @rakshitcgupta,

Could you clarify what you mean by registering a service which is not there in reality?

Also, what do you expect mapping a service to an actual service would be like?

Best,

Freddy

this means… consul services register “some random name”
and this command gets executed
Basically the service doesnot exist

I see. Yes, you can register services with any name in Consul, even if the service does not exist.

One way to tie a registration to an actual service is by also registering a health check for the service.

When you issue a DNS query for that service, it will only return the address if its checks are passing (and a service that does not exist should not be able to pass a health check).

The workflow to keep services and Consul in sync is primarily up to the user.

Users often opt to register services with Consul during the service deployment. For example, if a new instance of an api service is being deployed, a step in that deployment process would be to register the service with its local Consul agent.

Hello @freddygv I am new to consul. I have installed consul on my minikube k8’s environment. Now I have deployed a sample HTTPBIN application. So, now how to register my service here to consul service mesh and how to access the application from outside the service mesh. Can you please throw some light on this, it would be really helpful