The list of available labels and annotations for running Consul on Kubernetes.
Annotations and labels configure Consul sidecar properties and injection behavior when scheduling Kubernetes clusters. Learn about the annotations and labels that enable Consul’s service mesh and secure upstream communication on k8s in this reference guide.
page_title: Consul on Kubernetes Control Plane Architecture
description: >-
A high level overview of Consul on Kubernetes Architecture
When running on Kubernetes, Consul’s control plane architecture does not change significantly. Server agents are deployed as a StatefulSet with a persistent volume, while client agents run as a k8s DaemonSet with an exposed API port.
description: Compatibility Matrix for Consul Kubernetes
page_title: Consul on Kubernetes Version Compatibility
description: >-
New releases require corresponding version updates to Consul on Kubernetes and its Helm chart. Review the compatibility matrix for Consul and consul-k8s and additional notes for integrating Vault and third-party platforms.
---
# Compatibility Matrix for Consul on Kubernetes
# Consul on Kubernetes Version Compatibility
For every release of Consul on Kubernetes, a Helm chart, `consul-k8s-control-plane` binary and a `consul-k8s` CLI binary is built and distributed through a single version. When deploying via Helm, the recommended best path for upgrading Consul on Kubernetes, is to upgrade using the same `consul-k8s-control-plane` version as the Helm Chart, as the Helm Chart and Control Plane binary are tightly coupled.
page_title: Configure Certificate Authority (CA) for Consul on Kubernetes
description: >-
Consul includes a built-in CA, but when bootstrapping a cluster on k8s, you can configure your service mesh to use a custom certificate provider instead. Learn how to configure Vault as an external CA in primary and secondary datacenters and manually rotate Vault tokens.
---"
# Configuring a Connect CA Provider
# Configure Certificate Authority (CA) for Consul on Kubernetes
~> **NOTE:** The instructions below should only be used for initially bootstrapping a cluster with **Consul K8s 0.38.0+.**
To update the Connect CA provider on an existing cluster or to update any properties, such as tokens, of the CA provider,
page_title: Configure Health Checks for Consul on Kubernetes
description: >-
Kubernetes has built-in health probes you can sync with Consul's health checks to ensure service mesh traffic is routed to healthy pods. Learn how to register a TTL Health check and use mutating webhooks to redirect k8s liveness, readiness, and startup probes through Envoy proxies.
---
# Kubernetes Health Checks in Consul on Kubernetes
# Configure Health Checks for Consul on Kubernetes
~> This topic requires familiarity with [Kubernetes Health Checks](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
page_title: How does Consul Service Mesh Work on Kubernetes?
description: >-
Consul Service Mesh is a feature built into to Consul that enables automatic
service-to-service authorization and connection encryption across your Consul
services. Consul Service Mesh can be used with Kubernetes to secure pod communication with
other services.
An injection annotation allows Consul to automatically deploy sidecar proxies on Kubernetes pods, enabling Consul's service mesh for containers running on k8s. Learn how to configure sidecars, enable services with multiple ports, change default injection settings.
---
# Consul Service Mesh on Kubernetes
# How does Consul Service Mesh Work on Kubernetes?
[Consul Service Mesh](/docs/connect) is a feature built into to Consul that enables
automatic service-to-service authorization and connection encryption across
description: Configuring Ingress Controllers With Consul On Kubernetes
page_title: Configure Ingress Controllers for Consul on Kubernetes
description: >-
Ingress controllers are pluggable components that must be configured in k8s in order to use the Ingress resource. Learn how to deploy sidecars with the controller to secure its communication with Consul, review common configuration issues, and find links to example configurations.
---
# Configuring Ingress Controllers with Consul on Kubernetes
# Configure Ingress Controllers for Consul on Kubernetes
-> This topic requires familiarity with [Ingress Controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/)
description: Configuring Ingress Gateways on Kubernetes
page_title: Configure Ingress Gateways for Consul on Kubernetes
description: >-
Ingress gateways listen for external requests and route authorized traffic to instances in the service mesh running on Kubernetes. Learn how to configure ingress gateways, set intentions, and connect them to k8s applications.
---
# Ingress Gateways on Kubernetes
# Configure Ingress Gateways for Consul on Kubernetes
-> 1.9.0+: This feature is available in Consul versions 1.9.0 and higher
page_title: Configure metrics for Consul on Kubernetes
description: >-
Use the `connectInject.metrics` Helm values to enable Prometheus and Grafana integrations and capture metrics. Consul can collect metrics from the service mesh, sidecar proxies, agents, and gateways in a k8s cluster and then display service traffic metrics in Consul’s UI for additional observability.
---
# Metrics
# Configure Metrics for Consul on Kubernetes
Consul on Kubernetes integrates with Prometheus and Grafana to provide metrics for Consul Service Mesh. The metrics
description: Configuring Terminating Gateways on Kubernetes
page_title: Configure Terminating Gateways for Consul on Kubernetes
description: >-
Terminating gateways send secure requests from the service mesh to locations outside of the Kubernetes cluster. Learn how to configure terminating gateways for k8s, register external services in Consul’s service catalog, and define external sources as upstreams in your service mesh.
---
# Terminating Gateways on Kubernetes
# Configure Terminating Gateways for Consul on Kubernetes
Adding a terminating gateway is a multi-step process:
page_title: Custom Resource Definitions for Consul on Kubernetes
description: >-
Consul supports managing configuration entries via Kubernetes Custom Resources.
These custom resource can be used to manage the configuration for workloads
deployed within the cluster.
Consul on Kubernetes supports Consul's configuration entry kind through Custom Resource Definitions (CRDs). Learn how to configure Helm charts to enable CRDs and use kubectl to create, manage, and delete mesh components like gateways and intentions on k8s.
---
# Custom Resource Definitions
# Custom Resource Definitions (CRDs) for Consul on Kubernetes
This topic describes how to manage Consul [configuration entries](/docs/agent/config-entries)
via Kubernetes Custom Resources. Configuration entries provide cluster-wide defaults for the service mesh.
page_title: Upgrade Existing Clusters to Use Custom Resource Definitions
description: >-
Upgrade an existing cluster to use custom resources.
Kubernetes clusters configured with a Consul Helm chart version older than 0.30.0 require updates in order to use CRDs. Learn about upgrading to a supported Helm version and how to migrate a Consul config entry to a k8s CRD.
---
# Upgrade An Existing Cluster to CRDs
# Upgrade Existing Clusters to Use Custom Resource Definitions
Upgrading to consul-helm versions >= `0.30.0` will require some changes if
page_title: Resolve Consul DNS requests in Kubernetes
description: >-
One of the primary query interfaces to Consul is the DNS interface. The Consul
DNS interface can be exposed for all pods in Kubernetes using a stub-domain
configuration.
Use a k8s ConfigMap to configure KubeDNS or CoreDNS so that you can use Consul's `<service-name>.service.consul` syntax for queries and other DNS requests. In Kubernetes, this process uses either stub-domain or proxy configuration.
---
# Consul DNS on Kubernetes
# Resolve Consul DNS Requests in Kubernetes
One of the primary query interfaces to Consul is the
[DNS interface](/docs/discovery/dns). You can configure Consul DNS in
description: Configuration for the Consul Helm chart.
page_title: Helm Chart Reference
description: >-
The Helm Chart allows you to schedule Kubernetes clusters with injected Consul sidecars by defining custom values in a YAML configuration. Find stanza hierarchy, the parameters you can set, and their default values in this k8s reference guide.
Consul has many integrations with Kubernetes. You can deploy Consul to
Kubernetes using the Helm chart, sync services between Consul and Kubernetes,
automatically secure Pod communication with Connect, and more. This section
documents the official integrations between Consul and Kubernetes.
Consul supports Kubernetes natively, allowing you to deploy Consul sidecars to a Kubernetes service mesh and sync the k8s service registry with non-k8s services. Learn how to install Consul on Kubernetes with Helm or the Consul K8s CLI and get started with tutorials.
---
# Kubernetes
# Consul on Kubernetes
Consul has many integrations with Kubernetes. You can deploy Consul
to Kubernetes using the [Helm chart](/docs/k8s/installation/install#helm-chart-installation) or [Consul K8s CLI](/docs/k8s/installation/install#consul-k8s-cli-installation), sync services between Consul and
Consul K8s CLI is a tool for quickly installing and interacting with Consul on Kubernetes.
You can use the Consul K8s CLI tool to schedule Kubernetes deployments instead of using Helm. Learn how to download and install the tool to interact with Consul on Kubernetes using the `consul-k8s` command.
---
# Installing the Consul K8s CLI
# Install Consul on K8s CLI
Consul K8s CLI is a tool for quickly installing and interacting with Consul on Kubernetes. Ensure that you are installing the correct version of the CLI for your Consul on Kubernetes deployment, as the CLI and the control plane are version dependent.
page_title: Install Consul on Kubernetes with Helm
description: >-
Consul can run directly on Kubernetes, both in server or client mode. For
pure-Kubernetes workloads, this enables Consul to also exist purely within
Kubernetes. For heterogeneous workloads, Consul agents can join a server
running inside or outside of Kubernetes.
You can use Helm to configure Consul on Kubernetes deployments. Learn how to add the official Helm chart to your repository and the parameters that enable the service mesh, CNI plugins, Consul UI, and Consul HTTP API.
---
# Installing Consul on Kubernetes
# Install Consul on Kubernetes with Helm
Consul can run directly on Kubernetes, both in server or client mode.
For pure-Kubernetes workloads, this enables Consul to also exist purely
description: Installing Consul on Self Hosted Kubernetes
page_title: Install Consul on Self-Hosted Kubernetes Clusters
description: >-
The process for installing Consul on Kubernetes is the same as installing it on cloud-hosted k8s platforms, but requires additional configuration. Learn how to pre-define Persistent Volume Claims (PVCs) and a default storage class for server agents.
---
# Self Hosted Kubernetes
# Install Consul on Self-Hosted Kubernetes Clusters
Except for creating persistent volumes and ensuring there is a storage class
The Consul on Kubernetes CLI (consul-k8s) is a tool for installing and managing Consul on Kubernetes.
The Consul on Kubernetes CLI tool enables you to manage Consul with the `consul-k8s` command instead of direct interaction with Helm, kubectl, or Consul’s CLI. Learn about commands, their flags, and review examples in this reference guide.
description: Rotate Certificate on Kubernetes Cluster safely
page_title: Rotate TLS Certificates for Consul on Kubernetes
description: >-
In Consul Helm version 0.29.0 and later, new server agent TLS certificates are issued every time the Helm version is upgraded. Learn how to manually trigger certificate rotation if they do not rotate automatically.
---
# Rotating Server Certificates
# Rotate TLS Certificates for Consul on Kubernetes
As of Consul Helm version `0.29.0`, if TLS is enabled, new TLS certificates for the Consul Server
are issued every time the Helm chart is upgraded. These certificates are signed by the same CA and will
description: Rotate the Gossip Encryption Key on Kubernetes Cluster safely
page_title: Rotate Gossip Encryption Keys for Consul on Kubernetes
description: >-
Consul agents use encryption keys to secure their gossip communication, and you must rotate the keys periodically to maintain network security. Learn how to use `keygen` and `keyring` commands to rotate keys for agents on k8s clusters.
---
# Rotating Gossip Encryption Key
# Rotate Gossip Encryption Keys for Consul on Kubernetes
The following instructions provides a step-by-step manual process for rotating [gossip encryption](/docs/security/encryption#gossip-encryption) keys on Consul clusters that are deployed onto a Kubernetes cluster with Consul on Kubernetes.
description: Configure TLS on an existing Consul cluster running in Kubernetes
page_title: Rolling Updates to TLS for Existing Clusters on Kubernetes
description: >-
Consul Helm chart 0.16.0 and later supports TLS communication within clusters. Follow the instructions to trigger rolling updates for consul-k8s without causing downtime.
---
# Configuring TLS on an Existing Cluster
# Rolling Updates to TLS for Existing Clusters on Kubernetes
As of Consul Helm version `0.16.0`, the chart supports TLS for communication
within the cluster. If you already have a Consul cluster deployed on Kubernetes,
You can use the Consul-K8s CLI tool to remove all or part of a Consul installation on Kubernetes. You can also use Helm and then manually remove resources that Helm does not delete.
---
# Uninstall Consul
# Uninstall Consul on Kubernetes
You can uninstall Consul using Helm commands or the Consul K8s CLI.
The services in Kubernetes and Consul can be automatically synced so that
Kubernetes services are available to Consul agents and services in Consul can
be available as first-class Kubernetes services.
Service sync is a Consul on Kubernetes feature that makes Kubernetes and Consul services available to each other. Learn how to configure Helm values so services can communicate and make Kubernetes services appear in the Consul UI.
---
# Syncing Kubernetes and Consul Services
# Service Sync for Consul on Kubernetes
The services in Kubernetes and Consul can be automatically synced so that Kubernetes
services are available to Consul agents and services in Consul can be available
page_title: Upgrading Consul on Kubernetes Components
description: >-
Consul on Kubernetes relies on packages and binaries that have individual upgrade requirements. Learn how to update Helm configurations, Helm versions, Consul versions, and Consul agents, as well as how to determine what will change and its impact on your service mesh.
Consul K8s CLI is a tool for quickly installing and interacting with Consul on Kubernetes.
The Consul on Kubernetes CLI tool helps you schedule clusters without direct interaction with Helm or Consul’s CLI. Learn how to update the consul-k8s CLI tool to a new version.
---
# Upgrade the Consul K8s CLI
# Update the Consul K8s CLI
Consul K8s CLI is a tool for quickly installing and interacting with Consul on Kubernetes. Ensure that you are running the correct version of the CLI prior to upgrading your Consul on Kubernetes deployment, as the CLI and the control plane are version dependent.