Multi-port services overview
Warning
Multi-port services are part of a beta release. This documentation supports testing and development scenarios. Do not use multi-port services or the v2 catalog API in secure production environments.
This topic describes the process to register a service with multiple ports on Kubernetes deployments using the v2 catalog API. For information about the v2 catalog’s contents and structure, refer to v2 catalog API.
Workflow
To use a multi-port service in Consul on Kubernetes deployments, complete the following steps:
- Enable the v2 catalog. Add
global.experiments: ["resource-apis"]
andui.enabled: false
to a cluster's Helm chart before deploying Consul. - Use the
"consul.hashicorp.com/mesh-inject": "true"
annotation so that Consul registers the service automatically when Kubernetes deploys containers. - Configure traffic permissions. In the beta release, services registered to the v2 catalog allow all traffic by default. You can use the
TrafficPermissions
CRD to deny traffic to individual services for testing purposes. - Validate multi-port functionality. Send test traffic to each port to confirm that traffic is authorized and routed correctly.
For an example configuration and instructions for each of the steps in this workflow, refer to configure multi-port services.
[Link to/describe advanced routing configurations re: examples on configuration pages]
Constraints and limitations
Be aware of the following constraints and technical limitations on using multi-port services and the v2 catalog API:
- Consul client agents do not support multi-port services or the v2 catalog API beta. Kubernetes deployments support multi-port services using Consul dataplanes instead of client agents.
- The v1 and v2 catalog APIs cannot run concurrently.
- The Consul UI does not support multi-port services or the v2 catalog API in this release. You must disable the UI in the Helm chart in order to use the v2 catalog API.
- HCP Consul does not support multi-port services or 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. To register multi-port services, deploy a new Consul cluster that enables the v2 catalog.
Guidance
The following resources are available to help you use multi-port services: