Back to articles
Consul Has a Free API — Service Discovery and Mesh for Any Infrastructure
NewsDevOps

Consul Has a Free API — Service Discovery and Mesh for Any Infrastructure

via Dev.to DevOpsAlex Spinov

Consul: Service Discovery That Works Everywhere HashiCorp Consul provides service discovery, health checking, KV store, and service mesh. Works on Kubernetes, VMs, bare metal, and multi-cloud — unlike K8s-only solutions. Why Consul Service discovery across any platform Health checking with auto-deregistration Key-value store for config Service mesh with mTLS Multi-datacenter by design The Free API # Register a service curl -X PUT http://localhost:8500/v1/agent/service/register \ -d "{ \" Name \" : \" web \" , \" Port \" : 8080, \" Check \" : { \" HTTP \" : \" http://localhost:8080/health \" , \" Interval \" : \" 10s \" }}" # Discover services curl http://localhost:8500/v1/catalog/service/web # Health check curl http://localhost:8500/v1/health/service/web?passing = true # KV store curl -X PUT http://localhost:8500/v1/kv/config/db-host -d "postgres.example.com" curl http://localhost:8500/v1/kv/config/db-host?raw # List all services curl http://localhost:8500/v1/catalog/services # DNS dis

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
8 views

Related Articles