This lab is currently in Beta, content may be updated as we refine the material
LABINTERMEDIATE

Service Mesh Basics: Connect + Intentions

Put two apps into Consul's service mesh with Envoy sidecars, prove the traffic between them is mTLS-encrypted, then lock it down with default-deny intentions, a specific L4 allow, and an L7 rule that restricts a single HTTP path.

50 minutes
hashicorp/consul
Service Mesh Basics: Connect + Intentions - Platform Engineering Hands-On Lab Icon
Share this Lab

Lab Overview

This is the service mesh lab for the Consul 101 course. Everything runs on a single VM using Docker Compose for three demo apps (web, api, and billing) and a Consul Community Edition single-server agent, so you can build a full Connect service mesh without a multi-node cluster.

You will:

  • Register the web and api services with Connect sidecars, start their Envoy proxies, and prove web reaches api through mutual-TLS sidecar-to-sidecar traffic
  • Flip the mesh to a zero-trust posture with a default-deny service-intentions config entry, then add a specific L4 allow so web can reach api while a third service (billing) stays blocked
  • Declare the api protocol as http and write a Layer 7 application-aware intention that allows GET on one path but denies another, all within the already-authorized web-to-api relationship
  • Inspect the Connect CA and a service's issued leaf certificate to see the SPIFFE identity that mTLS and intentions are enforced against

Intentions are managed the modern way throughout, as service-intentions and service-defaults config entries applied with consul config write, matching the Section 7 lessons and Consul 2.0.x, not the legacy consul intention create CLI.

What You'll Learn

Register services with Connect sidecars and start their Envoy proxies with consul connect envoy

Verify sidecar-to-sidecar traffic flows over mutual TLS between two meshed services

Enforce a default-deny posture and a specific allow with service-intentions config entries

Write a Layer 7 application-aware intention that authorizes specific HTTP paths and methods

Inspect the Connect CA and a leaf certificate to read a service's SPIFFE identity

Prerequisites

Completion of the Consul 101 Section 7 (Consul Service Mesh Fundamentals) lessons

Familiarity with the consul CLI and consul config write

Basic Docker and Docker Compose familiarity

Technologies Covered

consulservice-meshconnectenvoyintentionsmtlszero-trustdocker-compose

Choose your plan

Simple, Transparent Pricing

Unlock full access to TeKanAid courses, labs, and bootcamps

Buying for a team? Private corporate training is available for up to 15 learners.View team training
MonthlyQuarterly
Try Premium free for 7 days →

Just exploring? Start free below. Want the full experience? Try Premium free for 7 days (card required, $0 today).

Pro

All courses, with lab scripts to run on your own machine

$59/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Full access to all courses
  • Lab scripts to download and run on your own machine (hosted labs not included)
  • Progress tracking
  • Certificate of completion
  • Community access
  • Self-paced bootcamps
  • Premium puzzle library not included (5 free puzzles available)
  • New content access
Recommended

Premium

Full access, including unlimited hosted labs

$99/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Everything in Pro
  • Unlimited hands-on labs, fully hosted on TeKanAid Academy (nothing to set up)
  • Full access to the puzzle library
  • Lab AI Assistant
  • Priority support

Prefer a single course?

Purchase individual courses for a one-time fee of $79. Full access to course content, quizzes, certificates, and community features, lab access is not included.

Browse Courses

Just exploring? Start free, no account needed

Three free ways to start. All bridge into the paid Premium catalog when you're ready.

Not ready to commit? The crash course is email-only. No academy account required.

Ready to Get Started?

Start this hands-on lab and build real-world Platform Engineering skills

Get Access Now