whatisgithub

What is consul-on-kubernetes?

kelseyhightower/consul-on-kubernetes — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2018-11-04

598ShellAudience · ops devopsComplexity · 4/5DormantSetup · hard

In one sentence

A step-by-step tutorial for manually deploying a secure, three-node Consul service discovery cluster on Kubernetes.

Mindmap

mindmap
  root((repo))
    What it does
      Consul cluster
      Service discovery
      Runs on Kubernetes
    Tech stack
      Kubernetes
      Consul
      Shell
      cfssl
    Use cases
      Microservice discovery
      Encrypted cluster comms
      Learning Consul setup
    Audience
      Platform engineers
      Kubernetes users
    Setup
      Generate certificates
      Deploy three nodes
      Verify via web UI

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Stand up a resilient Consul cluster on Kubernetes for service discovery across microservices.

USE CASE 2

Let containers dynamically discover each other's addresses instead of hardcoding IPs.

USE CASE 3

Learn how to generate and manage encryption certificates for secure internal cluster traffic.

USE CASE 4

Verify cluster health using Consul's web UI via kubectl port-forwarding.

What is it built with?

KubernetesConsulShellcfssl

How does it compare?

kelseyhightower/consul-on-kuberneteslenucksi/aur-malware-checkpyenv/pyenv-virtualenvwrapper
Stars598652678
LanguageShellShellShell
Last pushed2018-11-042017-08-20
MaintenanceDormantDormant
Setup difficultyhardeasy
Complexity4/52/5
Audienceops devopsops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an existing Kubernetes 1.11+ cluster plus kubectl, cfssl, and consul CLI tools.

So what is it?

Consul-on-Kubernetes is a step-by-step tutorial that teaches you how to run a three-node Consul cluster on Kubernetes. Consul is a tool for service discovery and health checking, meaning it helps the different parts of an application find each other and know which services are up or down. Running it on Kubernetes adds resilience, so if one node fails, the others keep things running. The tutorial walks you through generating encryption certificates to secure communication between Consul members, creating a shared encryption key for internal "gossip" traffic, and storing all of that in Kubernetes as secrets. You then deploy three Consul instances that form a cluster, each one starting up in sequence. Once running, you can verify the cluster is healthy by checking member status or opening Consul's built-in web UI via a local port-forward. This project is aimed at platform engineers or developers who already have a Kubernetes cluster and want to add Consul for service discovery. A practical scenario: you have a microservices application spread across multiple containers, and you need each service to dynamically discover where the others are without hardcoding IP addresses. This tutorial gets that infrastructure stood up with encrypted internal communication. The project is essentially a collection of shell commands and configuration files rather than a standalone application. It assumes comfort with command-line tools like kubectl, cfssl, and consul, and requires Kubernetes 1.11 or later. Everything is done manually step by step, which makes it educational but less automated than a one-click deployment solution. A cleanup script is included to tear down everything you created.

Copy-paste prompts

Prompt 1
Walk me through generating the encryption certificates and gossip key needed for this Consul-on-Kubernetes tutorial.
Prompt 2
Show me the kubectl commands to deploy a three-node Consul cluster on my existing Kubernetes setup.
Prompt 3
Explain how to verify my Consul cluster is healthy and access its web UI through port-forwarding.
Prompt 4
How do I use the included cleanup script to tear down the Consul cluster and secrets I created?

Frequently asked questions

What is consul-on-kubernetes?

A step-by-step tutorial for manually deploying a secure, three-node Consul service discovery cluster on Kubernetes.

What language is consul-on-kubernetes written in?

Mainly Shell. The stack also includes Kubernetes, Consul, Shell.

Is consul-on-kubernetes actively maintained?

Dormant — no commits in 2+ years (last push 2018-11-04).

How hard is consul-on-kubernetes to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is consul-on-kubernetes for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.