Skip to Content
Consul: Up and Running
book

Consul: Up and Running

by Luke Kysow
June 2022
Intermediate to advanced
260 pages
5h 34m
English
O'Reilly Media, Inc.
Content preview from Consul: Up and Running

Chapter 3. Deploying Consul

In this chapter, you will learn how to deploy Consul on Kubernetes or VMs. You can deploy Consul on self-managed or cloud-managed Kubernetes clusters and VMs. For testing purposes, and so you can complete the exercises throughout this book, this chapter also covers provisioning a Kubernetes cluster or VM on your local machine.

Once Consul is installed, you’ll learn how to interact with it through its UI, CLI, and API.

If you’re deploying Consul on VMs, skip ahead to “Deploying Consul on VMs”. Otherwise, continue reading to deploy Consul on Kubernetes.

Tip

If you’re unsure if you should use VMs or Kubernetes, I recommend deploying on Kubernetes because there are fewer steps.

Deploying Consul on Kubernetes

To deploy Consul on Kubernetes, you must first have a running Kubernetes cluster. Then you’ll use the consul-k8s CLI to install Consul with a single command.

Provisioning a Kubernetes Cluster

Consul can run on any type of Kubernetes cluster, whether in the cloud, for example, on Amazon Elastic Kubernetes Service (EKS) or Google Kubernetes Engine (GKE), or in a self-managed datacenter.

For the exercises in this book, if you’re running macOS or Linux, I recommend running Kubernetes on your local machine using a tool called minikube. I recommend minikube because it’s free and because it has an automatic port-forwarding feature that makes it easy to access services without fiddling with a lot of kubectl port-forward commands.

If minikube isn’t an option ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Kubernetes in Action

Kubernetes in Action

Marko Luksa
Istio: Up and Running

Istio: Up and Running

Lee Calcote, Zack Butcher
Microservices Security in Action

Microservices Security in Action

Prabath Siriwardena, Wajjakkara Kankanamge Anthony Nuwan Dias

Publisher Resources

ISBN: 9781098106133Errata Page