-
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 2 replies
-
In order to get per-route metrics in Linkerd, you need to create a service profile: https://linkerd.io/2/tasks/getting-per-route-metrics/ |
Beta Was this translation helpful? Give feedback.
-
Hi, I am not talking about per-route metrics. I am talking about DEFAULT metrics. I do not think I need a service profile. I have attached a simple yaml file as well to reproduce yourself. |
Beta Was this translation helpful? Give feedback.
-
Ah, I see what you mean. I'm assuming that your nginx deployment receives TLS traffic from the outside world. This means that the Linkerd proxy is not able to decrypt this traffic and therefore it proxies it transparently and so we don't have any HTTP metrics for traffic coming into nginx. You should still have metrics from traffic outbound from nginx to services in your cluster. |
Beta Was this translation helpful? Give feedback.
-
Can I assume that the very first pod receives a request from the outside world via ingress will not show any metrics? It basically makes me think that any pod irrespective of TLS enabled or not which receives traffic from ingress will NOT show any metric in the routes section. But as you say outbound metrics are shown for the pod. |
Beta Was this translation helpful? Give feedback.
-
If your nginx ingress is correctly setting the There are a few ways to confirm this: if you run You can also run
If those are absent then I recommend double checking your ingress configuration. Is your ingress injected in ingress mode? |
Beta Was this translation helpful? Give feedback.
-
@adleong If you are trying to replicate, Please DO NOT USE kubectl port-forward. instead use ingress as I had mentioned. |
Beta Was this translation helpful? Give feedback.
-
I attempted to reproduce this by installing Linkerd I port-forwarded from my computer to
These were correctly routed to the nginx-service. After sending the test requests, I saw route data in both the CLI and dashboard:
|
Beta Was this translation helpful? Give feedback.
-
This is how I set up. (Please I had explicitly mentioned earlier in my comment that it works fine when you use port-forward. Please ingore that option. This is more of ingress specific issue. It does not really bother me much. But if you think it is an issue, please fix it). I have updated /etc/host like this - the ip is k8s cluster ip for ingress. 10.11.12.13 mysite.example.com Now try to send to request to the pod via ingress via browser. I see the Host header is appended by the browser itself when it sends a request. But it is HTTP not HTTPS. does it matter? |
Beta Was this translation helpful? Give feedback.
-
@kitkars the one thing I don't see in your yaml above is the deployment for your ingress controller. Make sure that your ingress controller is injected in "ingress" mode: https://linkerd.io/2/tasks/using-ingress/#proxy-ingress-mode |
Beta Was this translation helpful? Give feedback.
-
@adleong @cpretzer I was travelling. could not get back to you guys immediately. Thanks for helping. |
Beta Was this translation helpful? Give feedback.
@kitkars the one thing I don't see in your yaml above is the deployment for your ingress controller. Make sure that your ingress controller is injected in "ingress" mode: https://linkerd.io/2/tasks/using-ingress/#proxy-ingress-mode