consul
Highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and configuration easy.
About this chart
HashiCorp Consul Helm Chart
HashiCorp Consul has multiple components, but as a whole, it is a tool for discovering and configuring services in your infrastructure
TL;DR
$ helm install <helm-repo>/consul
$ helm install bitnami/consul
Introduction
This chart bootstraps a HashiCorp Consul deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.
Prerequisites
- Kubernetes 1.4+ with Beta APIs enabled
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
$ helm install --name my-release <helm-repo>/consul
$ helm install --name my-release bitnami/consul The command deploys HashiCorp Consul on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release. Remove also the chart using --purge option:
$ helm delete --purge my-release
Configuration
The following tables lists the configurable parameters of the HashiCorp Consul chart and their default values.
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry | nil |
global.imagePullSecrets | Global Docker registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
image.registry | HashiCorp Consul image registry | docker.io |
image.repository | HashiCorp Consul image name | bitnami/consul |
image.tag | HashiCorp Consul image tag | {VERSION} |
image.pullPolicy | Image pull policy | Always |
image.pullSecrets | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
replicas | Number of replicas | 3 |
port | HashiCorp Consul http listening port | 8500 |
service.rpcPort | HashiCorp Consul rpc listening port | 8400 |
service.serflanPort | Container serf lan listening port | 8301 |
service.serverPort | Container server listening port | 8300 |
service.consulDnsPort | Container dns listening port | 8600 |
service.uiPort | HashiCorp Consul UI port | 80 |
datacenterName | HashiCorp Consul datacenter name | dc1 |
gossipKey | Gossip key for all members | nil |
domain | HashiCorp Consul domain | consul |
clientAddress | Address in which HashiCorp Consul will bind client interfaces | 0.0.0.0 |
serflanAddress | Address used for Serf LAN communications | 0.0.0.0 |
raftMultiplier | Multiplier used to scale key Raft timing parameters | 10Gi |
securityContext.enabled | Enable security context | true |
securityContext.fsGroup | Group ID for the container | 1001 |
securityContext.runAsUser | User ID for the container | 1001 |
updateStrategy.type | Statefulset update strategy policy | RollingUpdate |
persistence.enabled | Use a PVC to persist data | true |
persistence.storageClass | Storage class of backing PVC | nil (uses alpha storage class annotation) |
persistence.accessMode | Use volume as ReadOnly or ReadWrite | ReadWriteOnce |
persistence.size | Size of data volume | 8Gi |
persistence.annotations | Annotations for the persistent volume | nil |
resources | Container resource requests and limits | {} |
maxUnavailable | Pod disruption Budget maxUnavailable | 1 |
nodeAffinity | HashiCorp Consul pod node-affinity setting | nil |
antiAffinity | HashiCorp Consul pod anti-affinity setting | soft |
ui.service.enabled | Use a service to access HashiCorp Consul Ui | true |
ui.service.type | Kubernetes Service Type | ClusterIP |
ui.service.annotations | Annotations for HashiCorp Consul UI service | {} |
ui.service.loadBalancerIP | IP if HashiCorp Consul UI service type is LoadBalancer | nil |
ingress.enabled | Enable ingress controller resource | false |
ingress.certManager | Add annotations for cert-manager | false |
ingress.annotations | Ingress annotations | [] |
ingress.hosts[0].name | Hostname to your HashiCorp Consul installation | consul-ui.local |
ingress.hosts[0].path | Path within the url structure | / |
ingress.hosts[0].tls | Utilize TLS backend in ingress | false |
ingress.hosts[0].tlsSecret | TLS Secret (certificates) | consul-ui.local-tls |
ingress.secrets[0].name | TLS Secret Name | nil |
ingress.secrets[0].certificate | TLS Secret Certificate | nil |
ingress.secrets[0].key | TLS Secret Key | nil |
configmap | HashiCorp Consul configuration to be injected as ConfigMap | nil |
metrics.enabled | Start a side-car prometheus exporter | false |
metrics.image | Exporter image | prom/consul-exporter |
metrics.imageTag | Exporter image tag | v0.3.0 |
metrics.imagePullPolicy | Exporter image pull policy | IfNotPresent |
metrics.resources | Exporter resource requests/limit | {} |
metrics.podAnnotations | Exporter annotations | {} |
nodeSelector | Node labels for pod assignment | {} |
livenessProbe.initialDelaySeconds | Delay before liveness probe is initiated | 30 |
livenessProbe.periodSeconds | How often to perform the probe | 10 |
livenessProbe.timeoutSeconds | When the probe times out | 5 |
livenessProbe.successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
livenessProbe.failureThreshold | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
podAnnotations | Pod annotations | {} |
readinessProbe.initialDelaySeconds | Delay before readiness probe is initiated | 5 |
readinessProbe.periodSeconds | How often to perform the probe | 10 |
readinessProbe.timeoutSeconds | When the probe times out | 5 |
readinessProbe.successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
readinessProbe.failureThreshold | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 6 |
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
$ helm install --name my-release --set domain=consul-domain,gossipKey=secretkey <helm-repo>/consul
The above command sets the HashiCorp Consul domain to consul-domain and sets the gossip key to secretkey.
$ helm install --name my-release --set domain=consul-domain,gossipKey=secretkey bitnami/consul
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For exampl
Deploy consul with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has consul on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartconsul is pinned at v4.2.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply