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

Secure Agent Communication (TLS + Gossip)

Take a running 3-server Consul datacenter from plaintext to fully encrypted: create a CA, turn on mutual TLS for RPC, auto-distribute client certs, and rotate the gossip key live with zero downtime.

45 minutes
hashicorp/consul
Secure Agent Communication (TLS + Gossip) - Platform Engineering Hands-On Lab Icon
Share this Lab

Lab Overview

This lab secures the control plane of a live Consul datacenter end to end. You start with a healthy three-server cluster (consul-server-1, consul-server-2, consul-server-3) that already encrypts its gossip traffic but runs its internal RPC in plaintext, and you harden it exactly as an operator would.

You will:

  • Create a certificate authority with `consul tls ca create` and mint one

server certificate per node with `consul tls cert create -server`

  • Configure the current nested `tls` stanza on all three agents with

`verify_incoming`, `verify_outgoing`, and `verify_server_hostname`, then restart the cluster so its RPC runs over mutual TLS

  • Enable `auto_encrypt` so the servers hand out client certificates from the

built-in Connect CA instead of you distributing them by hand

  • Rotate the gossip encryption key on the live cluster with the four-step

`consul keyring` workflow (install, use, remove) and no downtime

This is the hands-on counterpart to Section 05 of the Consul 101 course, and it uses the same nested `tls` configuration and `consul keyring` rotation procedure taught in those lessons.

What You'll Learn

Create a CA and server certificates with the built-in consul tls CLI

Configure the current nested tls stanza with all three verify settings

Turn on mutual TLS for internal RPC on a running cluster

Enable auto_encrypt so servers distribute client certificates automatically

Rotate the gossip encryption key live with no downtime using consul keyring

Prerequisites

Completion of the Consul 101 Section 05 (Securing Agent Communication) lessons

Familiarity with the consul CLI (members, operator raft, keyring)

Basic Linux command line, systemd, and TLS concepts

Technologies Covered

consultlsmtlsgossip-encryptionauto-encryptkeyringzero-trustsecurity

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