This document addresses common questions about multi-port pods in HashiCorp Consul. Metrics and metrics merging are not supported for these pods, and the following answers clarify some of the related issues.
In the HashiCorp Consul documentation on Kubernetes multi-port pods, there is a section titled “Caveats for Multi-port Pods”, which clarifies that metrics and metrics merging are not supported for multi-port pods. Here are responses to some additional questions that might arise:
Metrics for Multi-port Pods
Q: Is it possible to enable metrics collection for multi-port pods through the Consul dataplane?
A: Currently, metrics and metrics merging are not supported for multi-port pods. While metrics might function in some cases, their behavior can be unreliable. For this reason, we cannot recommend enabling them.
Q: Can multi-port pods be excluded from metrics collection?
A: Yes. You can customize metrics settings on a per-service basis. Refer to the Per-Service Metrics Configuration documentation for details.
Per-Service Metrics Configuration.
Additionally, you can override metrics settings for specific pods using the following annotations:
Important Considerations for Multi-port Pods
- Caveats for Multi-port Pods
- The v2 Catalog API, introduced as an experimental feature in Consul v1.17.0, initially supported multi-port Kubernetes services but was deprecated as of Consul v1.19.0. For more details on the Catalog API, please refer to v2 Catalog documentation