consul
by KubeGems
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 repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release 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.12+
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/consul
These commands deploy HashiCorp Consul on the Kubernetes cluster in the default configuration. The Parameters 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
Parameters
The following table 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) |
global.storageClass | Global storage class for dynamic provisioning | nil |
Common parameters
| Parameter | Description | Default |
|---|---|---|
nameOverride | String to partially override consul.fullname | nil |
fullnameOverride | String to fully override consul.fullname | nil |
clusterDomain | Default Kubernetes cluster domain | cluster.local |
commonLabels | Labels to add to all deployed objects | nil |
commonAnnotations | Annotations to add to all deployed objects | [] |
extraDeploy | Array of extra objects to deploy with the release (evaluated as a template) | nil |
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | nil |
HashiCorp Consul parameters
| Parameter | Description | Default |
|---|---|---|
image.registry | HashiCorp Consul image registry | docker.io |
image.repository | HashiCorp Consul image name | bitnami/consul |
image.tag | HashiCorp Consul image tag | {TAG_NAME} |
image.pullPolicy | Image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
image.debug | Specify if debug logs should be enabled | false |
datacenterName | HashiCorp Consul datacenter name | dc1 |
domain | HashiCorp Consul domain | consul |
raftMultiplier | Multiplier used to scale key Raft timing parameters | 1 |
gossipKey | Gossip key for all members | nil |
tlsEncryptionSecretName | Name of existing secret with TLS encryption data | nil |
hostAliases | Add deployment host aliases | [] |
configuration | HashiCorp Consul configuration to be injected as ConfigMap | {} |
existingConfigmap | Name of existing ConfigMap with HashiCorp Consul configuration | nil |
localConfig | Extra configuration that will be added to the default one | nil |
command | Override default container command (useful when using custom images) | nil |
args | Override default container args (useful when using custom images) | nil |
extraEnvVars | Extra environment variables to be set on HashiCorp Consul container | {} |
extraEnvVarsCM | Name of existing ConfigMap containing extra env vars | nil |
extraEnvVarsSecret | Name of existing Secret containing extra env vars | nil |
containerPorts.http | Port to open for HTTP in Consul | 8500 |
containerPorts.dns | Port to open for DNS server in Consul | 8600 |
containerPorts.rcp | Port to open for RCP in Consul | 8400 |
containerPorts.rpcServer | Port to open for RCP Server in Consul | 8300 |
containerPorts.serfLAN | Port to open for Serf LAN in Consul | 8301 |
Statefulset parameters
| Parameter | Description | Default |
|---|---|---|
replicaCount | Number of HashiCorp Consul replicas | 3 |
updateStrategy | Update strategy type for the statefulset | RollingUpdate |
rollingUpdatePartition | Partition update strategy | nil |
priorityClassName | HashiCorp Consul priorityClassName | nil |
podManagementPolicy | StatefulSet pod management policy | OrderedReady |
podAnnotations | Additional pod annotations | {} |
podLabels | Additional pod labels | {} |
podAffinityPreset | Pod affinity preset. Ignored if affinity is set. Allowed values: soft or hard | "" |
podAntiAffinityPreset | Pod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hard | soft |
nodeAffinityPreset.type | Node affinity preset type. Ignored if affinity is set. Allowed values: soft or hard | "" |
nodeAffinityPreset.key | Node label key to match Ignored if affinity is set. | "" |
nodeAffinityPreset.values | Node label values to match. Ignored if affinity is set. | [] |
affinity | Affinity for pod assignment | {} (evaluated as a template) |
nodeSelector | Node labels for pod assignment | {} (evaluated as a template) |
tolerations | Tolerations for pod assignment | [] (evaluated as a template) |
podSecurityContext.enabled | Enable security context for HashiCorp Consul pods | true |
podSecurityContext.fsGroup | Group ID for the volumes of the pod | 1001 |
containerSecurityContext.enabled | HashiCorp Consul Container securityContext | true |
containerSecurityContext.runAsUser | User ID for the HashiCorp Consul container | 1001 |
resources.limits | The resources limits for HashiCorp Consul containers | {} |
resources.requests | The requested resources for HashiCorp Consul containers | {} |
livenessProbe | Liveness probe configuration for HashiCorp Consul | Check values.yaml file |
readinessProbe | Readiness probe configuration for HashiCorp Consul | Check values.yaml file |
customLivenessProbe | Override default liveness probe | nil |
customReadinessProbe | Override default readiness probe | nil |
extraVolumeMounts | Optionally specify extra list of additional volumeMounts for hashicorp consul container | [] |
extraVolumes | Optionally specify extra list of additional volumes for hashicorp consul container | [] |
initContainers | Add additional init containers to the hashicorp consul pods | {} (evaluated as a template) |
sidecars | Add additional sidecar containers to the hashicorp consul pods | {} (evaluated as a template) |
pdb.create | Enable/disable a Pod Disruption Budget creation | false |
pdb.minAvailable | Minimum number/percentage of pods that should remain scheduled | 1 |
pdb.maxUnavailable | Maximum number/percentage of pods that may be made unavailable | nil |
Exposure parameters
| Parameter | Description | Default |
|---|
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 v9.2.14 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