Background

I needed to get up to speed on Hashicorp's Consul. I had just spun up a Kubernets cluster to continue learning, and thought, where better elese to deploy and configure Consul?

Of course, deploying Consul with Helm Charts would be the preferred way to go, and alas, they have one!

Assumptions

  1. You have a functioning Kubernetes cluster.
  2. You have Helm installed and configured.
  3. In my case and for the context of this post, I installed K8s on Digital Ocean Droplets, so dynamic provisioning of Persistent Volume with a Storage Class like AzureDisk and the claiming of Public IP's from a PaaS with a LoadBalancer object isn't possible. This probably won't directly apply to an Enterprise environment.

How-To

Helm Chart for Consul: https://github.com/kubernetes/charts/tree/master/stable/consul

Create PV and PVCs

values.yaml

Create a local copy of the values.yaml file from the GitHub Repo, and update it as needed. Here's an example of mine:

Install Chart

helm install --name consul --values /home/user/helm/values.yaml stable/consul

Uninstall Chart

helm del --purge consul