I've been trying to use Linkerd's route based metrics to contact a DNS outside of my Kubernetes cluster. Ideally I'd like to know the success and failure rates of these requests. Latency would also be helpful; hence Linkerd seems like a potential fit.
There's documentation on enabling route based metrics and even mention of them working using an external name. Great!
However, when I've implemented this on my cluster I've had no success getting any metrics. Is this something not supported by Linkerd?
Ideally, I'd like to be able to meter outbound requests leaving my cluster and determine their success/failure rates and latency.
I've provided a simplified example YAML config where requests are made to the service object from an on-cluster application injected with Linkerd. I've tried attaching the l5d-header in these requests to test.default.svc.cluster.local
. In the cases I've tested, I get a 200 response (requests through the external name to the DNS work successfully). However, no route based metrics appear in Prometheus.
kind: Service
apiVersion: v1
metadata:
name: test
spec:
type: ExternalName
externalName: redacted.com # External to my cluster. Does not have Linkerd proxy attached.
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: linkerd.io/v1alpha2
kind: ServiceProfile
metadata:
name: test.default.svc.cluster.local
spec:
routes:
- condition:
method: GET
pathRegex: '.*'
name: External Name GET
responseClasses:
- condition:
status:
min: 500
max: 599
isFailure: true
For validation I've checked Prometheus directly. And I've also tried to verify functionality with linkerd-viz routes
Does anyone has insights into what might be going wrong or perhaps this just isn't supported?
This is not yet a feature supported by Linkerd. According to Buoyant, it's a potential for it to be released in Linkerd 1.26