github.com/KyaXTeam/consul@v1.4.5/website/source/docs/platform/k8s/helm.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Helm - Kubernetes"
     4  sidebar_current: "docs-platform-k8s-helm"
     5  description: |-
     6    The Consul Helm chart is the recommended way to install and configure Consul on Kubernetes. In addition to running Consul itself, the Helm chart is the primary method for installing and configuring Consul integrations with Kubernetes such as catalog syncing, Connect injection, and more.
     7  ---
     8  
     9  # Helm Chart
    10  
    11  The [Consul Helm chart](https://github.com/hashicorp/consul-helm)
    12  is the recommended way to install and configure Consul on Kubernetes.
    13  In addition to running Consul itself, the Helm chart is the primary
    14  method for installing and configuring Consul integrations with
    15  Kubernetes such as catalog syncing, Connect injection, and more.
    16  
    17  This page assumes general knowledge of [Helm](https://helm.sh/) and
    18  how to use it. Using Helm to install Consul will require that Helm is
    19  properly installed and configured with your Kubernetes cluster.
    20  
    21  -> **Important:** The Helm chart is new and
    22  may still change significantly over time. Please always run Helm with
    23  `--dry-run` before any install or upgrade to verify changes.
    24  
    25  ~> **Security Warning:** By default, the chart will install an insecure configuration
    26  of Consul. This provides a less complicated out-of-box experience for new users,
    27  but is not appropriate for a production setup. It is highly recommended to use
    28  a properly secured Kubernetes cluster or make sure that you understand and enable
    29  the [recommended security features](/docs/internals/security.html). Currently,
    30  some of these features are not supported in the Helm chart and require additional
    31  manual configuration.
    32  
    33  ## Using the Helm Chart
    34  
    35  To use the Helm chart, you must download or clone the
    36  [consul-helm GitHub repository](https://github.com/hashicorp/consul-helm)
    37  and run Helm against the directory. We plan to transition to using a real
    38  Helm repository soon. When running Helm, we highly recommend you always
    39  checkout a specific tagged release of the chart to avoid any
    40  instabilities from master.
    41  
    42  Prior to this, you must have Helm installed and configured both in your
    43  Kubernetes cluster and locally on your machine. The steps to do this are
    44  out of the scope of this document, please read the
    45  [Helm documentation](https://helm.sh/) for more information.
    46  
    47  Example chart usage:
    48  
    49  ```sh
    50  # Clone the chart repo
    51  $ git clone https://github.com/hashicorp/consul-helm.git
    52  $ cd consul-helm
    53  
    54  # Checkout a tagged version
    55  $ git checkout v0.1.0
    56  
    57  # Run Helm
    58  $ helm install --dry-run ./
    59  ```
    60  
    61  ~> **Warning:** By default, the chart will install _everything_: a
    62  Consul server cluster, client agents on all nodes, feature components, etc.
    63  This provides a nice out-of-box experience for new users, but may not be
    64  appropriate for a production setup. Consider setting the `global.enabled`
    65  value to `false` and opt-in to the various components.
    66  
    67  ## Configuration (Values)
    68  
    69  The chart is highly customizable using
    70  [Helm configuration values](https://docs.helm.sh/using_helm/#customizing-the-chart-before-installing).
    71  Each value has a sane default tuned for an optimal getting started experience
    72  with Consul. Before going into production, please review the parameters below
    73  and consider if they're appropriate for your deployment.
    74  
    75  * <a name="v-global" href="#v-global">`global`</a> - These global values affect multiple components of the chart.
    76  
    77    * <a name="v-global-enabled" href="#v-global-enabled">`enabled`</a> (`boolean: true`) - The master enabled/disabled configuration. If this is true, most components will be installed by default. If this is false, no components will be installed by default and manually opt-in is required, such as by setting <a href="#v-">`server.enabled`</a> to true.
    78  
    79    * <a name="v-global-domain" href="#v-global-domain">`domain`</a> (`string: "consul"`) - The domain Consul uses for DNS queries. This is used to configure agents both for DNS listening but also to know what domain to join the cluster. This should be consistent throughout the chart, but can be overridden per-component as well.
    80  
    81    * <a name="v-global-image" href="#v-global-image">`image`</a> (`string: "consul:latest"`) - The name of the Docker image (including any tag) for the containers running Consul agents. **This should be pinned to a specific version when running in production.** Otherwise, other changes to the chart may inadvertently upgrade your Consul version.
    82  
    83    * <a name="v-global-imagek8s" href="#v-global-imagek8s">`imageK8S`</a> (`string: "hashicorp/consul-k8s:latest"`) - The name of the Docker image (including any tag) for the [consul-k8s](https://github.com/hashicorp/consul-k8s) binary. This is used by components such as catalog sync. **This should be pinned to a specific version when running in production.** Otherwise, other changes to the chart may inadvertently upgrade the version.
    84  
    85    * <a name="v-global-datacenter" href="#v-global-datacenter">`datacenter`</a> (`string: "dc1"`) - The name of the datacenter that the agent cluster should register as. This may not be changed once the cluster is bootstrapped and running, since Consul doesn't yet support an automatic way to change this value.
    86  
    87  * <a name="v-server" href="#v-server">`server`</a> - Values that configure running a Consul server within Kubernetes.
    88  
    89    * <a name="v-server-enabled" href="#v-server-enabled">`enabled`</a> (`boolean: global.enabled`) - If true, the chart will install all the resources necessary for a Consul server cluster. If you're running Consul externally and want agents within Kubernetes to join that cluster, this should probably be false.
    90  
    91    * <a name="v-server-image" href="#v-server-image">`image`</a> (`string: global.image`) - The name of the Docker image (including any tag) for the containers running Consul server agents.
    92  
    93    * <a name="v-server-replicas" href="#v-server-replicas">`replicas`</a> (`integer: 3`) -The number of server agents to run. This determines the fault tolerance of the cluster. Please see the [deployment table](/docs/internals/consensus.html#deployment-table) for more information.
    94  
    95    * <a name="v-server-bootstrapexpect" href="#v-server-bootstrapexpect">`bootstrapExpect`</a> (`integer: 3`) - For new clusters, this is the number of servers to wait for before performing the initial leader election and bootstrap of the cluster. This must be less than or equal to `server.replicas`. This value is only used when bootstrapping new clusters, it has no effect during ongoing cluster maintenance.
    96  
    97    * <a name="v-server-storage" href="#v-server-storage">`storage`</a> (`string: 10Gi`) - This defines the disk size for configuring the servers' StatefulSet storage. For dynamically provisioned storage classes, this is the desired size. For manually defined persistent volumes, this should be set to the disk size of the attached volume.
    98  
    99    * <a name="v-server-storageclass" href="#v-server-storageclass">`storageClass`</a> (`string: null`) - The StorageClass to use for the servers' StatefulSet storage. It must be able to be dynamically provisioned if you want the storage to be automatically created. For example, to use [Local](https://kubernetes.io/docs/concepts/storage/storage-classes/#local) storage classes, the PersistentVolumeClaims would need to be manually created. A `null` value will use the Kubernetes cluster's default StorageClass. If a default StorageClass does not exist, you will need to create one.
   100  
   101    * <a name="v-server-connect" href="#v-server-connect">`connect`</a> (`boolean: true`) - This will enable/disable [Connect](/docs/connect/index.html). Setting this to true _will not_ automatically secure pod communication, this setting will only enable usage of the feature. Consul will automatically initialize a new CA and set of certificates. Additional Connect settings can be configured by setting the `server.extraConfig` value.
   102  
   103    * <a name="v-server-resources" href="#v-server-resources">`resources`</a> (`string: null`) - The resource requests (CPU, memory, etc.) for each of the server agents. This should be a multi-line string mapping directly to a Kubernetes [ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#resourcerequirements-v1-core) object. If this isn't specified, then the pods won't request any specific amount of resources. **Setting this is highly recommended.**
   104  
   105          ```yaml
   106          # Resources are defined as a formatted multi-line string:
   107          resources: |
   108            requests:
   109              memory: "10Gi"
   110            limits:
   111             memory: "10Gi"
   112          ```
   113  
   114    * <a name="v-server-updatepartition" href="#v-server-updatepartition">`updatePartition`</a> (`integer: 0`) - This value is used to carefully control a rolling update of Consul server agents. This value specifies the [partition](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions) for performing a rolling update. Please read the linked Kubernetes documentation for more information.
   115  
   116    * <a name="v-server-disruptionbudget" href="#v-server-disruptionbudget">`disruptionBudget`</a> - This configures the [PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for the server cluster.
   117  
   118        - <a name="v-server-disruptionbudget-enabled" href="#v-server-disruptionbudget-enabled">`enabled`</a> (`boolean: true`) -
   119        This will enable/disable registering a PodDisruptionBudget for
   120        the server cluster. If this is enabled, it will only register the
   121        budget so long as the server cluster is enabled.
   122  
   123        - <a name="v-server-disruptionbudget-maxunavailable" href="#v-server-disruptionbudget-maxunavailable">`maxUnavailable`</a> (`integer: null`) -
   124        The maximum number of unavailable pods. By default, this will be automatically
   125        computed based on the `server.replicas` value to be `(n/2)-1`. If you need to set
   126        this to `0`, you will need to add a `--set 'server.disruptionBudget.maxUnavailable=0'`
   127        flag to the helm chart installation command because of a limitation in the Helm
   128        templating language.
   129  
   130    * <a name="v-server-extraconfig" href="#v-server-extraconfig">`extraConfig`</a> (`string: "{}"`) - A raw string of extra JSON [configuration](/docs/agent/options.html) for Consul servers. This will be saved as-is into a ConfigMap that is read by the Consul server agents. This can be used to add additional configuration that isn't directly exposed by the chart.
   131  
   132          ```yaml
   133          # ExtraConfig values are formatted as a multi-line string:
   134          extraConfig: |
   135            {
   136              "log_level": "DEBUG"
   137            }
   138          ```
   139          This can also be set using Helm's `--set` flag (consul-helm v0.7.0 and later), using the following syntax:
   140  
   141          ```shell
   142          --set 'server.extraConfig="{"log_level": "DEBUG"}"'
   143          ```
   144  
   145    * <a name="v-server-extravolumes" href="#v-server-extravolumes">`extraVolumes`</a> (`array: []`) - A list of extra volumes to mount for server agents. This is useful for bringing in extra data that can be referenced by other configurations at a well known path, such as TLS certificates or Gossip encryption keys. The value of this should be a list of objects. Each object supports the following keys:
   146  
   147        - <a name="v-server-extravolumes-type" href="#v-server-extravolumes-type">`type`</a> (`string: required`) -
   148        Type of the volume, must be one of "configMap" or "secret". Case sensitive.
   149  
   150        - <a name="v-server-extravolumes-name" href="#v-server-extravolumes-name">`name`</a> (`string: required`) -
   151        Name of the configMap or secret to be mounted. This also controls the path
   152        that it is mounted to. The volume will be mounted to `/config/userconfig/<name>`.
   153  
   154        - <a name="v-server-extravolumes-load" href="#v-server-extravolumes-load">`load`</a> (`boolean: false`) -
   155        If true, then the agent will be configured to automatically load HCL/JSON
   156        configuration files from this volume with `-config-dir`. This defaults
   157        to false.
   158  
   159    * <a name="v-server-affinity" href="#v-server-affinity">`affinity`</a> (`string`) - This value defines the [affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) for server pods. It defaults to allowing only a single pod on each node, which minimizes risk of the cluster becoming unusable if a node is lost. If you need to run more pods per node (for example, testing on Minikube), set this value to `null`.
   160  
   161          ```yaml
   162          # Recommended default server affinity:
   163          affinity: |
   164            podAntiAffinity:
   165              requiredDuringSchedulingIgnoredDuringExecution:
   166                - labelSelector:
   167                    matchLabels:
   168                      app: {{ template "consul.name" . }}
   169                      release: "{{ .Release.Name }}"
   170                      component: server
   171                topologyKey: kubernetes.io/hostname
   172          ```
   173  
   174    * <a name="v-server-priorityclassname" href="#v-server-priorityclassname">`priorityClassName`</a> (`string`) - This value references an existing Kubernetes [priorityClassName](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#pod-priority) that can be assigned to server pods.
   175  
   176    * <a name="v-server-annotations" href="#v-server-annotations">`annotations`</a> (`string`) - This value defines additional annotations for server pods. This should be a formatted as a multi-line string.
   177  
   178          ```yaml
   179          annotations: |
   180            "sample/annotation1": "foo"
   181            "sample/annotation2": "bar"
   182          ```
   183  
   184  * <a name="v-client" href="#v-client">`client`</a> - Values that configure running a Consul client on Kubernetes nodes.
   185  
   186    * <a name="v-client-enabled" href="#v-client-enabled">`enabled`</a> (`boolean: global.enabled`) - If true, the chart will install all the resources necessary for a Consul client on every Kubernetes node. This _does not_ require `server.enabled`, since the agents can be configured to join an external cluster.
   187  
   188    * <a name="v-client-image" href="#v-client-image">`image`</a> (`string: global.image`) - The name of the Docker image (including any tag) for the containers running Consul client agents.
   189  
   190    * <a name="v-client-join" href="#v-client-join">`join`</a> (`array<string>: null`) - A list of valid [`-retry-join` values](/docs/agent/options.html#retry-join). If this is `null` (default), then the clients will attempt to automatically join the server cluster running within Kubernetes. This means that with `server.enabled` set to true, clients will automatically join that cluster. If `server.enabled` is not true, then a value must be specified so the clients can join a valid cluster.
   191  
   192    * <a name="v-client-grpc" href="#v-client-grpc">`grpc`</a> (`boolean: false`) - If true, agents will enable their GRPC listener on port 8502 and expose it to the host. This will use slightly more resources, but is required for [Connect](/docs/platform/k8s/connect.html).
   193  
   194    * <a name="v-client-resources" href="#v-client-resources">`resources`</a> (`string: null`) - The resource requests (CPU, memory, etc.) for each of the client agents. This should be a multi-line string mapping directly to a Kubernetes [ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#resourcerequirements-v1-core) object. If this isn't specified, then the pods won't request any specific amount of resources.
   195  
   196          ```yaml
   197          # Resources are defined as a formatted multi-line string:
   198          resources: |
   199            requests:
   200              memory: "10Gi"
   201            limits:
   202              memory: "10Gi"
   203          ```
   204  
   205    * <a name="v-client-extraconfig" href="#v-client-extraconfig">`extraConfig`</a> (`string: "{}"`) - A raw string of extra JSON [configuration](/docs/agent/options.html) for Consul clients. This will be saved as-is into a ConfigMap that is read by the Consul agents. This can be used to add additional configuration that isn't directly exposed by the chart.
   206  
   207          ```yaml
   208          # ExtraConfig values are formatted as a multi-line string:
   209          extraConfig: |
   210            {
   211              "log_level": "DEBUG"
   212            }
   213          ```
   214          This can also be set using Helm's `--set` flag (consul-helm v0.7.0 and later), using the following syntax:
   215  
   216          ```shell
   217          --set 'client.extraConfig="{"log_level": "DEBUG"}"'
   218          ```
   219  
   220    * <a name="v-client-extravolumes" href="#v-client-extravolumes">`extraVolumes`</a> (`array: []`) - A list of extra volumes to mount for client agents. This is useful for bringing in extra data that can be referenced by other configurations at a well known path, such as TLS certificates or Gossip encryption keys. The value of this should be a list of objects. Each object supports the following keys:
   221  
   222        - <a name="v-client-extravolumes-type" href="#v-client-extravolumes-type">`type`</a> (`string: required`) -
   223        Type of the volume, must be one of "configMap" or "secret". Case sensitive.
   224  
   225        - <a name="v-client-extravolumes-name" href="#v-client-extravolumes-name">`name`</a> (`string: required`) -
   226        Name of the configMap or secret to be mounted. This also controls the path
   227        that it is mounted to. The volume will be mounted to `/config/userconfig/<name>`.
   228  
   229        - <a name="v-client-extravolumes-load" href="#v-client-extravolumes-load">`load`</a> (`boolean: false`) -
   230        If true, then the agent will be configured to automatically load HCL/JSON
   231        configuration files from this volume with `-config-dir`. This defaults
   232        to false.
   233  
   234    * <a name="v-client-priorityclassname" href="#v-client-priorityclassname">`priorityClassName`</a> (`string`) - This value references an existing Kubernetes [priorityClassName](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#pod-priority) that can be assigned to client pods.
   235  
   236    * <a name="v-client-annotations" href="#v-client-annotations">`annotations`</a> (`string`) - This value defines additional annotations for client pods. This should be a formatted as a multi-line string.
   237  
   238          ```yaml
   239          annotations: |
   240            "sample/annotation1": "foo"
   241            "sample/annotation2": "bar"
   242          ```
   243  
   244  * <a name="v-dns" href="#v-dns">`dns`</a> - Values that configure Consul DNS service.
   245  
   246    * <a name="v-dns-enabled" href="#v-dns-enabled">`enabled`</a> (`boolean: global.enabled`) - If true, a `consul-dns` service will be created that exposes port 53 for TCP and UDP to the running Consul agents (servers and clients). This can then be used to [configure kube-dns](/docs/platform/k8s/dns.html). The Helm chart _does not_ automatically configure kube-dns.
   247  
   248  * <a name="v-synccatalog" href="#v-synccatalog">`syncCatalog`</a> - Values that configure the [service sync](/docs/platform/k8s/service-sync.html) process.
   249  
   250    * <a name="v-synccatalog-enabled" href="#v-synccatalog-enabled">`enabled`</a> (`boolean: false`) - If true, the chart will install all the resources necessary for the catalog sync process to run.
   251  
   252    * <a name="v-synccatalog-image" href="#v-synccatalog-image">`image`</a> (`string: global.imageK8S`) - The name of the Docker image (including any tag) for [consul-k8s](/docs/platform/k8s/index.html#quot-consul-k8s-quot-project)
   253  to run the sync program.
   254  
   255    * <a name="v-synccatalog-default" href="#v-synccatalog-default">`default`</a> (`boolean: true`) - If true, all valid services in K8S are synced by default. If false, the service must be [annotated](/docs/platform/k8s/service-sync.html#sync-enable-disable) properly to sync. In either case an annotation can override the default.
   256  
   257    * <a name="v-synccatalog-toconsul" href="#v-synccatalog-toconsul">`toConsul`</a> (`boolean: true`) - If true, will sync Kubernetes services to Consul. This can be disabled to have a one-way sync.
   258  
   259    * <a name="v-synccatalog-tok8s" href="#v-synccatalog-tok8s">`toK8S`</a> (`boolean: true`) - If true, will sync Consul services to Kubernetes. This can be disabled to have a one-way sync.
   260  
   261    * <a name="v-synccatalog-k8sprefix" href="#v-synccatalog-k8sprefix">`k8sPrefix`</a> (`string: ""`) - A prefix to prepend to all services registered in Kubernetes from Consul. This defaults to `""` where no prefix is prepended; Consul services are synced with the same name to Kubernetes. (Consul -> Kubernetes sync only)
   262  
   263    * <a name="v-synccatalog-k8stag" href="#v-synccatalog-k8stag">`k8sTag`</a> (`string: null`) - An optional tag that is applied to all of the Kubernetes services that are synced into Consul. If nothing is set, this defaults to "k8s". (Kubernetes -> Consul sync only)
   264  
   265    * <a name="v-synccatalog-clusterip-sync" href="#v-synccatalog-clusterip-sync">`syncClusterIPServices`</a> (`boolean: true`) - If true, will sync Kubernetes ClusterIP services to Consul. This can be disabled to have the sync ignore ClusterIP-type services.
   266  
   267    * <a name="v-synccatalog-nodeport-sync" href="#v-synccatalog-nodeport-sync">`nodePortSyncType`</a> (`string: ExternalFirst`) - Configures the type of syncing that happens for NodePort services. The only valid options are: `ExternalOnly`, `InternalOnly`, and `ExternalFirst`. `ExternalOnly` will only use a node's ExternalIP address for the sync, otherwise the service will not be synced. `InternalOnly` uses the node's InternalIP address. `ExternalFirst` will preferentially use the node's ExternalIP address, but if it doesn't exist, it will use the node's InternalIP address instead.
   268  
   269    * <a name="v-synccatalog-acl-sync-token" href="#v-synccatalog-acl-sync-token">`aclSyncToken`</a> - references a Kubernetes [secret](https://kubernetes.io/docs/concepts/configuration/secret/#creating-your-own-secrets) that contains an existing Consul ACL token. This will provide the sync process the correct permissions. This is only needed if ACLs are enabled on the Consul cluster.
   270  
   271      - <a name="v-synccatalog-acl-sync-token-secret-name" href="#v-synccatalog-acl-sync-token-secret-name">secretName </a>`(string: null)` - The name of the Kubernetes secret. This defaults to null.
   272  
   273      - <a name="v-synccatalog-acl-sync-token-secret-key" href="#v-synccatalog-acl-sync-token-secret-key">secretKey </a>`(string: null)` - The key for the Kubernetes secret. This defaults to null.
   274  
   275  * <a name="v-ui" href="#v-ui">`ui`</a> - Values that configure the Consul UI.
   276  
   277    * <a name="v-ui-enabled" href="#v-ui-enabled">`enabled`</a> (`boolean: global.enabled`) - If true, the UI will be enabled. This will only _enable_ the UI, it doesn't automatically register any service for external access. The UI will only be enabled on server agents. If `server.enabled` is false, then this setting has no effect. To expose the UI in some way, you must configure `ui.service`.
   278  
   279    * <a name="v-ui-service" href="#v-ui-service">`service`</a> - This configures the `Service` resource registered for the Consul UI.
   280  
   281        - <a name="v-ui-service-enabled" href="#v-ui-service-enabled">`enabled`</a> (`boolean: true`) -
   282        This will enable/disable registering a Kubernetes Service for the Consul UI.
   283        This value only takes effect if `ui.enabled` is true and taking effect.
   284  
   285        - <a name="v-ui-service-type" href="#v-ui-service-type">`type`</a> (`string: null`) -
   286        The service type to register. This defaults to `null` which doesn't set
   287        an explicit service type, which typically is defaulted to "ClusterIP"
   288        by Kubernetes. The available service types are documented on
   289        [the Kubernetes website](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types).
   290  
   291  * <a name="v-connectinject" href="#v-connectinject">`connectInject`</a> - Values that configure running the [Connect injector](/docs/platform/k8s/connect.html).
   292  
   293    * <a name="v-connectinject-enabled" href="#v-connectinject-enabled">`enabled`</a> (`boolean: false`) - If true, the chart will install all the resources necessary for the Connect injector process to run. This will enable the injector but will require pods to opt-in with an annotation by default.
   294  
   295    * <a name="v-connectinject-image" href="#v-connectinject-image">`image`</a> (`string: global.imageK8S`) - The name of the Docker image (including any tag) for the [consul-k8s](https://github.com/hashicorp/consul-k8s) binary.
   296  
   297    * <a name="v-connectinject-default" href="#v-connectinject-default">`default`</a> (`boolean: false`) - If true, the injector will inject the Connect sidecar into all pods by default. Otherwise, pods must specify the. [injection annotation](/docs/platform/k8s/connect.html#consul-hashicorp-com-connect-inject) to opt-in to Connect injection. If this is true, pods can use the same annotation to explicitly opt-out of injection.
   298  
   299    * <a name="v-connectinject-imageConsul" href="#v-connectinject-imageConsul">`imageConsul`</a> (`string: global.image`) - The name of the Docker image (including any tag) for Consul. This is used for proxy service registration, Envoy configuration, etc.
   300  
   301    * <a name="v-connectinject-imageEnvoy" href="#v-connectinject-imageEnvoy">`imageEnvoy`</a> (`string: ""`) - The name of the Docker image (including any tag) for the Envoy sidecar. `envoy` must be on the executable path within this image. This Envoy version must be compatible with the Consul version used by the injector. This defaults to letting the injector choose the Envoy image, which is usually `envoy/envoy-alpine`.
   302  
   303    * <a name="v-connectinject-namespaceselector" href="#v-connectinject-namespaceselector">`namespaceSelector`</a> (`string: ""`) - A [selector](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) for restricting injection to only matching namespaces. By default all namespaces except the system namespace will have injection enabled.
   304  
   305    * <a name="v-connectinject-certs" href="#v-connectinject-certs">`certs`</a> - The certs section configures how the webhook TLS certs are configured. These are the TLS certs for the Kube apiserver communicating to the webhook. By default, the injector will generate and manage its own certs, but this requires the ability for the injector to update its own `MutatingWebhookConfiguration`. In a production environment, custom certs should probably be used. Configure the values below to enable this.
   306  
   307        - <a name="v-connectinject-certs-secretname" href="#v-connectinject-certs-secretname">`secretName`</a> (`string: null`) -
   308        secretName is the name of the Kubernetes secret that has the TLS certificate and
   309        private key to serve the injector webhook. If this is null, then the
   310        injector will default to its automatic management mode.
   311  
   312        - <a name="v-connectinject-cabundle" href="#v-connectinject-cabundle">`caBundle`</a> (`string: ""`) -
   313        The PEM-encoded CA public certificate bundle for the TLS certificate served by the
   314        injector. This must be specified as a string and can't come from a
   315        secret because it must be statically configured on the Kubernetes
   316        `MutatingAdmissionWebhook` resource. This only needs to be specified
   317        if `secretName` is not null.
   318  
   319        - <a name="v-connectinject-certs-certname" href="#v-connectinject-certs-certname">`certName`</a> (`string: "tls.crt"`) -
   320        The name of the certificate file within the `secretName` secret.
   321  
   322        - <a name="v-connectinject-certs-keynamkeyname" href="#v-connectinject-certs-keyname">`keyName`</a> (`string: "tls.key"`) -
   323        The name of the private key for the certificate file within the
   324        `secretName` secret.
   325  
   326  ## Using the Helm Chart to deploy Consul Enterprise
   327  
   328  You can also use this Helm chart to deploy Consul Enterprise by following a few extra steps.
   329  
   330  Find the license file that you received in your welcome email. It should have the extension `.hclic`. You will use the contents of this file to create a Kubernetes secret before installing the Helm chart.
   331  
   332  -> **Note:** If you cannot find your `.hclic` file, please contact your sales team or Technical Account Manager.
   333  
   334  You can use the following commands to create the secret:
   335  
   336  ```bash
   337  secret=$(cat 1931d1f4-bdfd-6881-f3f5-19349374841f.hclic)
   338  kubectl create secret generic consul-ent-license --from-literal="key=${secret}"
   339  ```
   340  
   341  In your `values.yaml`, change the value of `global.image` to one of the enterprise [release tags](https://hub.docker.com/r/hashicorp/consul-enterprise/tags).
   342  
   343  ```yaml
   344  global:
   345    image: "hashicorp/consul-enterprise:1.4.3-ent"
   346  ```
   347  
   348  Add the name of the secret you just created to `server.enterpriseLicense`.
   349  
   350  ```yaml
   351  server:
   352    enterpriseLicense:
   353      secretName: "consul-ent-license"
   354      secretKey: "key"
   355  ```
   356  
   357  Add the `--wait` option to your `helm install` command. This will force Helm to wait for all the pods
   358  to become ready before it applies the license to your Consul cluster.
   359  
   360  ```bash
   361  $ helm install --wait .
   362  ```
   363  
   364  Once the cluster is up, you can verify the nodes are running Consul Enterprise.
   365  
   366  ```bash
   367  $ kubectl port-forward service/consul-server 8500 &
   368  $ consul license get
   369  License is valid
   370  License ID: 1931d1f4-bdfd-6881-f3f5-19349374841f
   371  Customer ID: b2025a4a-8fdd-f268-95ce-1704723b9996
   372  Expires At: 2020-03-09 03:59:59.999 +0000 UTC
   373  Datacenter: *
   374  Package: premium
   375  Licensed Features:
   376          Automated Backups
   377          Automated Upgrades
   378          Enhanced Read Scalability
   379          Network Segments
   380          Redundancy Zone
   381          Advanced Network Federation
   382  $ consul members
   383  Node                                       Address           Status  Type    Build      Protocol  DC   Segment
   384  consul-server-0                            10.60.0.187:8301  alive   server  1.4.3+ent  2         dc1  <all>
   385  consul-server-1                            10.60.1.229:8301  alive   server  1.4.3+ent  2         dc1  <all>
   386  consul-server-2                            10.60.2.197:8301  alive   server  1.4.3+ent  2         dc1  <all>
   387  ```
   388  
   389  ## Helm Chart Examples
   390  
   391  The below values.yaml can be used to set up a single server Consul cluster with a LoadBalancer to allow external access to the UI and API.
   392  
   393  ```
   394  global:
   395    enabled: true
   396    image: "consul:1.4.2"
   397    domain: consul
   398    datacenter: dc1
   399  
   400  server:
   401    enabled: true
   402    replicas: 1
   403    bootstrapExpect: 1
   404    storage: 10Gi
   405  
   406  client:
   407    enabled: true
   408  
   409  dns:
   410    enabled: true
   411  
   412  ui:
   413    enabled: true
   414    service:
   415      enabled: true
   416      type: LoadBalancer
   417  ```
   418  
   419  The below values.yaml can be used to set up a three server Consul Enterprise cluster with 100GB of storage and automatic Connect injection for annotated pods in the "my-app" namespace.
   420  
   421  Note, this would require a secret that contains the enterprise license key.
   422  
   423  ```
   424  global:
   425    enabled: true
   426    domain: consul
   427    image: "hashicorp/consul-enterprise:1.4.2-ent"
   428    datacenter: dc1
   429  
   430  server:
   431    enabled: true
   432    replicas: 3
   433    bootstrapExpect: 3
   434    enterpriseLicense:
   435      secretName: "consul-license"
   436      secretKey: "key"
   437    storage: 100Gi
   438    connect: true
   439    affinity: |
   440      podAntiAffinity:
   441        requiredDuringSchedulingIgnoredDuringExecution:
   442          - labelSelector:
   443            matchLabels:
   444              app: {{ template "consul.name" . }}
   445              release: "{{ .Release.Name }}"
   446              component: server
   447          topologyKey: kubernetes.io/hostname
   448  
   449  client:
   450    enabled: true
   451    grpc: true
   452  
   453  dns:
   454    enabled: true
   455  
   456  ui:
   457    enabled: true
   458    service:
   459      enabled: true
   460      type: NodePort
   461  
   462  connectInject:
   463    enabled: true
   464    default: false 
   465    namespaceSelector: "my-app"
   466  
   467  ```
   468  
   469  ## Customizing the Helm Chart
   470  
   471  Consul within Kubernetes is highly configurable and the Helm chart contains dozens of the most commonly used configuration options. If you need to extend the Helm chart with additional options, we recommend using a third-party tool, such as [kustomize](https://github.com/kubernetes-sigs/kustomize) or [ship](https://github.com/replicatedhq/ship).