In this guide, we’ll explore how to verify the status of your services in HashiCorp Consul using the UI, DNS interface, and HTTP API. We’ll also walk through adding a second node to the cluster and confirming that multiple service instances are correctly registered.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
Viewing Services in the Consul UI
We have a client node named web-server-01 which registers thefront-end-eCommerce service. On the Consul UI home screen, you’ll see two entries:
- consul (2 instances)
- front-end-eCommerce (1 instance)

check web on port 80), which passes since Apache is running on the host.

Querying the Service Catalog
You can also query Consul programmatically via DNS or the HTTP API. Below is a quick comparison:| Query Method | Command | Output Format |
|---|---|---|
| DNS (port 8600) | dig @<CONSUL_IP> -p 8600 front-end-eCommerce.service.consul A | A records (IP addresses) |
| HTTP API (port 8500) | curl http://<CONSUL_IP>:8500/v1/catalog/service/front-end-eCommerce?ns=default | jq | JSON array |
DNS Lookup
Consul’s built-in DNS server listens on port 8600 by default. Ensure your firewall allows UDP/TCP traffic on this port.
HTTP API Query
Fetch the service catalog via HTTP:Adding a Second Server
Let’s register web-server-02 with the samefront-end-eCommerce service.
| Step | Command | Expected Result |
|---|---|---|
| Start Consul agent | sudo systemctl start consul | Agent is running |
| Join the cluster | consul join 10.0.101.110 | web-server-02 shows in consul members |
| Register the service | consul services register service-with-health.json | Service appears in UI |