SEP 12 2018 MITCHELL HASHIMOTO
We're releasing features every week. This week we're releasing the for running and configuring Consul on Kubernetes.
Using the Helm chart, you can start a complete Consul cluster on Kubernetes in minutes. The Helm chart can setup and configure a Consul server cluster, client agents, or both. The Helm chart will also be the primary mechanism for setting up .
Video
To learn more about the Consul Helm chart, watch the video below or scroll down to read more. The video below shows the Helm chart being used to install, reconfigure, and upgrade Consul.
Youtube:
Youku:
Running a Consul Cluster
The Helm chart can be used to setup Consul on Kubernetes in minutes.
The chart is currently available via the . We plan on supporting official Helm repositories in the future. For now you must download or clone this repository to get started. After downloading the repository, please check out a tagged release:
$ git clone https://github.com/hashicorp/consul-helm.git$ cd consul-helm/$ git checkout v0.1.0 复制代码
Then, install the chart:
$ helm install ....复制代码
In a few minutes, you'll have a three node server cluster deployed, bootstrapped, and joined with a Consul agent running on every Kubernetes node. Once the pods are up and ready, you can view the Consul UI by forwarding port 8500 from a server pod and opening your browser to http://localhost:8500/
.
$ kubectl port-forward consul-server-0 8500:8500...复制代码
The Helm chart is highly configurable. You can use the configuration to disable components, change the image used, expose the UI service, configure resource requirements, storage classes, and much much more. See the full reference documentation of for more information.
For Consul Enterprise users, a custom image can be configured with the Helm chart. HashiCorp does not currently publish official Docker images for Consul Enterprise. We plan to do this, but in the mean time if you create custom Docker images in private repositories, you can configure the Helm chart to use those images.
Running a Client-Only Cluster
In addition to deploying a full server cluster, the Helm chart can be used to deploy a client-only cluster. This is a common deployment pattern where the Consul servers are run outside of the Kubernetes cluster. The example configuration below enables this deployment model:
global: enabled: falseclient: enabled: true join: - "provider=aws tag_key=... tag_value=..."复制代码
This configuration disables all Helm chart components by default, then explicitly enables only clients. The join
configuration then uses to discover and join pre-existing Consul server agents.
The Helm chart supports dozens of configuration options. See the full reference documentation of for more information.
Next
The Consul Helm chart provides a single package for installing, configuring, and upgrading Consul on Kubernetes, as well as future Consul + Kubernetes components. The Helm chart is . To learn more, see the or the documentation on .
We have more exciting Consul + Kubernetes integrations being released in the coming weeks. Please to learn more.