Installing Consul in a VM

First, we will download and install Consul on the VM and then install it in Kubernetes. To install Consul in a VM, follow these steps:

  1. Visit the download site for Consul: https://www.consul.io/downloads.html.
  2. To be consistent with the exercises in this book, download the v1.6.1. package for Linux AMD64:
$ wget https://releases.hashicorp.com/consul/1.6.1/consul_1.6.1_linux_amd64.zip


Note: Consul maintains its releases at https://releases.hashicorp.com/consul, where you can pick a particular version to work with. For this book, we'll be using version 1.6.1.
  1. Extract consul from the .zip archive and move it to a directory that's on PATH:
$ unzip consul_1.6.1_linux_amd64.zip
$ sudo mv consul /bin

This completes the installation.

  1. Check the version of Consul that's been installed:
$ consul version
Consul v1.6.1
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)

One of the best characteristics of Consul is that it can run in a heterogeneous environment that spans multiple data centers. For example, if a data center is running hundreds of VMs for service legacy applications, Consul can run as an agent on each VM to monitor their health and the services running on the nodes.

Consul is available as a VM as well as in Kubernetes environments. The Consul version we're using is 1.6.1. The same version of Consul is available in the Kubernetes environment, but with a different version number. For example, Consul Helm chart 0.9.1 is equivalent to Consul 1.6.1. Hashicorp may integrate both as a single release in the future, but they are released separately as of now and can be updated independently of each other. 

Now, we have installed Consul in a VM. Since we are running Kubernetes in the same VM, we will install Consul in Kubernetes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.27.244