consul
Bitnami Helm chart for HashiCorp Consul
1M+
HashiCorp Consul is a tool for discovering and configuring services in your infrastructure.
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/consul
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository.
This chart bootstraps a HashiCorp Consul deployment on a Kubernetes cluster using the Helm package manager.
To install the chart with the release name my-release:
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/consul
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
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
This section describes credentials, configuration, and other installation options.
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the resourcesPreset values, which automatically sets the resources section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
This chart can be integrated with Prometheus by setting metrics.enabled to true. This will deploy a sidecar container with consul_exporter in all pods and a metrics service, which can be configured under the metrics.service section. This metrics service will have the necessary annotations to be automatically scraped by Prometheus.
It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the Bitnami Prometheus helm chart or the Bitnami Kube Prometheus helm chart to easily have a working Prometheus in your cluster.
The chart can deploy ServiceMonitor objects for integration with Prometheus Operator installations. To do so, set the value metrics.serviceMonitor.enabled=true. Ensure that the Prometheus Operator CustomResourceDefinitions are installed in the cluster or it will fail with the following error:
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
Install the Bitnami Kube Prometheus helm chart for having the necessary CRDs and the Prometheus Operator.
This helm chart supports to customize the whole configuration file.
You can specify the Hashicorp Consul configuration using the configuration parameter.
In addition to this option, you can also set an external ConfigMap with all the configuration files. This is done by setting the existingConfigmap parameter. Note that this will override the previous option.
This chart provides support for exposing Hashicorp Consul UI using the Gateway API and its HTTPRoute resource. If you have a Gateway controller installed on your cluster, such as APISIX, Contour, Envoy Gateway, NGINX Gateway Fabric or Kong Ingress Controller you can utilize the Gateway controller to serve your application. To enable Gateway API integration, set httpRoute.enabled to true.
The Gateway to be used can be customized by setting the httpRoute.parentRefs parameter. By default, it will reference a Gateway named gateway in the same namespace as the release.
You can specify the list of hostnames to be mapped to the deployment using the httpRoute.hostnames parameter. Additionally, you can customize the rules used to route the traffic to the service by modifying the httpRoute.matches and httpRoute.filters parameters or adding new rules using the httpRoute.extraRules parameter.
This chart also supports creating a BackendTLSPolicy to define the SNI the Gateway should use to connect to the Hashicorp Consul UI backend pods and how the certificate served by these pods should be verified. To do so, set the backendTLSPolicy.enabled parameter to true. Please note it's required to secure traffic using TLS so you need to also set tls.existingSecret to reference a secret containing the TLS certificates used by the Hashicorp Consul UI.
This chart provides support for Ingress resources. If you have an ingress controller installed on your cluster, such as nginx-ingress-controller or contour you can utilize the ingress controller to serve your application.
To enable ingress integration, please set ingress.enabled to true.
Most likely you will only want to have one hostname that maps to this ASP.NET Core installation. If that's your case, the property ingress.hostname will set it. However, it is possible to have more than one host. To facilitate this, the ingress.extraHosts object can be specified as an array. You can also use ingress.extraTLS to add the TLS configuration for extra hosts.
For each host indicated at ingress.extraHosts, please indicate a name, path, and any annotations that you may want the ingress controller to know about.
For annotations, please see this document. Not all annotations are supported by all ingress controllers, but this document does a good job of indicating which annotation is supported by many popular ingress controllers.
This chart will facilitate the creation of TLS secrets for use with the ingress controller, however, this is not required. There are three common use cases:
In the first two cases, one will need a certificate and a key. We would expect them to look like this:
-----BEGIN CERTIFICATE-----
MIID6TCCAtGgAwIBAgIJAIaCwivkeB5EMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV
...
jScrvkiBO65F46KioCL9h5tDvomdU1aqpI/CBzhvZn1c0ZTf87tGQR8NK7v7
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAvLYcyu8f3skuRyUgeeNpeDvYBCDcgq+LsWap6zbX5f8oLqp4
...
wrj2wDbCDCFmfqnSJ+dKI3vFLlEz44sAV8jX/kd4Y6ZTQhlLbYc=
-----END RSA PRIVATE KEY-----
If you are going to use Helm to manage the certificates, please copy these values into the certificate and key values for a given ingress.secrets entry.
If you are going to manage TLS secrets outside of Helm, please know that you can create a TLS secret (named consul-ui.local-tls for example).
Please see this example for more information.
TLS encription can be configured by setting tls.enabled to true. This will generate self-signed certificates and configure Consul tls.defaults with their location.
For production environments, we recommend using your own certificates by setting the value tls.existingSecret.
If you would like to configure additional TLS settings, the configuration can be overwritten using the value tls.configuration and tls.existingConfigmap. For example:
tls:
configuration: |-
{
"defaults": {
"ca_file": "/opt/bitnami/consul/certs/ca.crt",
"cert_file": "/opt/bitnami/consul/certs/tls.crt",
"key_file": "/opt/bitnami/consul/certs/tls.key",
"verify_incoming": true,
"verify_outgoing": true,
"verify_server_hostname": true,
},
"https": {
...
}
}
### <a id="metrics"></a> Metrics
The chart can optionally start a metrics exporter endpoint on port `9107` for [prometheus](https://prometheus.io). The data exposed by the endpoint is intended to be consumed by a prometheus chart deployed within the cluster and as such the endpoint is not exposed outside the cluster.
### <a id="adding-extra-environment-variables"></a> Adding extra environment variables
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
```yaml
extraEnvVars:
- name: LOG_LEVEL
value: error
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the .extraEnvVarsCM or the extraEnvVarsSecret properties.
This chart allows you to set your custom affinity using the affinity parameter. Find more information about Pod's affinity in the kubernetes documentation.
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the bitnami/common chart. To do so, set the podAffinityPreset, podAntiAffinityPreset, or nodeAffinityPreset parameters.
If you have a need for additional containers to run within the same pod as MongoDB®, you can do so via the sidecars config parameter. Simply define your container according to the Kubernetes container spec.
sidecars:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
Similarly, you can add extra init containers using the initContainers parameter.
initContainers:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.
The FIPS parameters only have effect if you are using images from the Bitnami Secure Images catalog.
For more information on this new support, please refer to the FIPS Compliance section.
The Bitnami HashiCorp Consul image stores the HashiCorp Consul data at the /bitnami path of the container.
Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube. See the Parameters section to configure the PVC or to disable persistence.
As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it.
By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However this feature does not work in all Kubernetes distributions. As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.
You can enable this initContainer by setting volumePermissions.enabled to true.
The following subsections list global, common, and component-specific parameters.
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.defaultStorageClass | Global default StorageClass for Persistent Volume(s) | "" |
global.storageClass | DEPRECATED: use global.defaultStorageClass instead | "" |
global.defaultFips | Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overridden by the 'fips' object | restricted |
global.security.allowInsecureImages | Allows skipping image verification | false |
global.compatibility.openshift.adaptSecurityContext | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | auto |
| Name | Description | Value |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
nameOverride | String to partially override common.names.fullname | "" |
fullnameOverride | String to fully override common.names.fullname | "" |
commonLabels | Labels to add to all deployed objects (sub-charts are not considered) | {} |
commonAnnotations | Annotations to add to all deployed objects (sub-charts are not considered) | {} |
clusterDomain | Kubernetes cluster domain name | cluster.local |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
| Name | Description | Value |
|---|---|---|
image.registry | HashiCorp Consul image registry | REGISTRY_NAME |
image.repository | HashiCorp Consul image repository | REPOSITORY_NAME/consul |
image.digest | HashiCorp Consul image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | "" |
image.pullPolicy | HashiCorp Consul image pull policy | IfNotPresent |
image.pullSecrets | HashiCorp Consul image pull secrets | [] |
image.debug | Enable image debug mode | false |
datacenterName | Datacenter name for Consul. If not supplied, will use the Consul | dc1 |
domain | Consul domain name | consul |
raftMultiplier | Multiplier used to scale key Raft timing parameters | 1 |
gossipKey | Gossip key for all members. The key must be base64-encoded, can be generated with $(consul keygen) | "" |
automountServiceAccountToken | Mount Service Account token in pod | false |
hostAliases | Deployment pod host aliases | [] |
configuration | HashiCorp Consul configuration to be injected as ConfigMap | "" |
existingConfigmap | ConfigMap with HashiCorp Consul configuration | "" |
localConfig | Extra configuration that will be added to the default one | "" |
tls.enabled | Enable Consul TLS configuration | false |
tls.existingSecret | Name of a Secret containing the Consul TLS certificates | "" |
tls.configuration | Override the TLS default configuration | {} |
tls.existingConfigmap | Existing configmap containing an additional Consul configuration file called 'tls.json' | "" |
podLabels | Pod labels | {} |
priorityClassName | Priority class assigned to the Pods |
Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-app-doc/apps-charts-consul-index.html
Content type
Image
Digest
sha256:73e57b66e…
Size
7.8 kB
Last updated
11 months ago
docker pull bitnamicharts/consul:sha256-e3bdbc04788053ef7fa21f750234daa5fd0689c01c884a502dbac4f364e80a3aPulls:
66,472
Jun 29 to Jul 5