.
HashiCorp Consul

Connect and secure services across any runtime platform and cloud
🚀 About
In this HashiQube DevOps lab, you'll get hands-on experience with HashiCorp Consul, a service networking solution that connects, configures, and secures services in dynamic infrastructure environments.
For hands-on interactive labs with Consul, visit HashiCorp Learn.
📰 Latest News
- Consul 1.17 GA adds locality-aware routing and multi-port support
- Consul 1.17 beta and HCP Consul Central
- Consul 1.16 enhances service mesh reliability, user experience, and security
- Consul 1.15 adds Envoy extensions and enhances Envoy access logging
- Consul 1.14 GA: Announcing Simplified Service Mesh Deployments
- Consul 1.13 Introduces Cluster Peering
- Consul 1.12 Hardens Security on Kubernetes with Vault
📋 Provision
vagrant up --provision-with basetools,docker,docsify,consul
docker compose exec hashiqube /bin/bash
bash hashiqube/basetools.sh
bash docker/docker.sh
bash docsify/docsify.sh
bash consul/consul.sh
🖥️ Web UI
After provisioning, you can access the Consul web interface through your browser.

Consul web interface showing services and health status
🔍 Key Features
- Service Discovery - Register services and discover others with DNS or HTTP
- Health Checking - Monitor the health of services to ensure availability
- Key/Value Store - Store dynamic configuration in a distributed key-value store
- Service Mesh - Secure service-to-service communication with automatic TLS
- Multi-Datacenter - Federate multiple Consul clusters across datacenters
- Service Configuration - Distribute configuration data to services dynamically
🧩 Consul DNS
To use Consul as a DNS resolver from your laptop, create the following file:
File: /etc/resolver/consul
nameserver 10.9.99.10
port 8600
With this configuration, you can resolve service names like nomad.service.consul
and fabio.service.consul
directly from your machine.
📊 Monitoring Consul
HashiQube includes Prometheus and Grafana for monitoring Consul.
For detailed information, see the Monitoring HashiCorp Consul guide.
🛠️ Provisioner Script
The script below automates the setup of Consul in your HashiQube environment: