Consul v2 architecture
Warning
The v2 catalog API and Traffic Permissions API are currently in beta. This documentation supports testing and development scenarios. Do not use these APIs in secure production environments.
This topic provides an overview of Consul's v2 architecture changes and their impact on Consul operations.
In the v1.17.0 release, Consul introduced the option to enable the v2 catalog API for testing and development on Kubernetes deployments. The v2 catalog is one of several changes in development to simplify and streamline Consul's architecture.
Overview
The v2 architecture changes include the following:
Differences between v1 and v2
The change in data models introduced by the v2 architecture impacts several aspects of Consul’s operations.
Traffic permissions resource replaces service intentions
The most significant change to Consul’s architecture and operations when using the v2 catalog structure is the introduction of the traffic permissions resource. This resource replaces the service intentions configuration entry, and enables authorized service-to-service communication for both L4 and L7 applications.
For more information about this resource, including example configurations, refer to Traffic permissions configuration reference.
HTTPRoute, GRPCRoute, and TCPRoute resources for traffic management
You can configure traffic management behavior such as service splitting in an HTTPRoute
, GRPCRoute
, or TCPRoute
resource. In the v1 catalog, this behavior is defined in dedicated configuration entries. For examples, refer to service splitter configuration entry reference.
For more information about these resource, including specifications and example configurations, refer to HTTPRoute resource configuration reference, GRPCRoute resource configuration reference, and TCPRoute resource configuration reference.
New proxy configuration resource
In the v1 catalog, a service’s sidecar proxy and its behavior is defined in the Proxy
field of the service definition. You can also separately define a service mesh proxy and configure proxy defaults.
In the v2 catalog, the ProxyConfiguration
resource configures a workload's sidecar proxy behavior according to Consul workload identity. Refer to ProxyConfiguration resource configuration reference for more information.
Constraints and limitations
Be aware of the following constraints and technical limitations on the v2 catalog API:
- The v2 catalog API only supports deployments using Consul dataplanes instead of client agents. Consul on Kubernetes uses dataplanes by default.
- The v1 and v2 catalog APIs cannot run concurrently. Because configuration entries are part of the v1 catalog, you cannot use them when the v2 catalog is enabled. Use v2 resources instead.
- The Consul UI does not support the v2 catalog API in this release. You must disable the UI in the Helm chart in order to use the v2 catalog API.
- Secondary datacenters in WAN-federated deployments cannot enable the v2 catalog API in this release.
- HCP Consul does not support the v2 catalog API in this release. You cannot link a self-managed cluster to HCP Consul to access its UI or view observability metrics when it uses the v2 catalog.
- We do not recommend updating existing clusters to enable the v2 catalog in this release. Instead, deploy a new Consul cluster and enable the v2 catalog in the Helm chart.
Guidance
The following resources are available to help you use the v2 catalog API: