Skills / Engineering / HashiCorp Consul

HashiCorp Consul

Service discovery, health checking, and service mesh with HashiCorp Consul. Register services, run health checks, store config in the KV store, and wire Consul Connect for secure, mTLS service-to-service communication across clusters.

This skill helps you operate HashiCorp Consul for dynamic service discovery and connectivity. It registers services and defines health checks, uses the KV store for distributed configuration, sets up Consul Connect service mesh with mTLS and intentions, configures DNS-based discovery, and integrates Consul with Nomad and Vault for a full HashiStack. It also covers multi-datacenter federation and ACL policies.

consul service-discovery service-mesh hashicorp devops

When to use

Use when working with HashiCorp Consul — registering services, health checks, KV configuration store, DNS discovery, or Consul Connect service mesh with mTLS and intentions.

Examples

Register a service

Discovery with health checks

Write a Consul service definition for a payments API on port 8080 with an HTTP health check on /healthz every 10s, tags for version and environment, and register it via the agent

Connect service mesh

Secure mTLS with intentions

Set up Consul Connect so the web service can reach the api service over mTLS, and create an intention that denies all other services from calling api
Added to wishlist