Permission Denied 403 (Forbidden) error in Thanos Querier when using CNAME record URL to add Thanos Sidecar of another Cluster running Prometheus with Thanos #5419
Unanswered
satyadevareti
asked this question in
Questions & Answers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We have 2 EKS Clusters deployed on AWS. One cluster which we are using as an Observer Cluster is running Thanos Querier. And the other cluster running as an Observee cluster, has Prometheus (with 2 replicas) along with Thanos as a Sidecar deployed inside an Istio Service Mesh.
On the Observee Cluster:
We are using Headless service (named prometheus-thanos-headless-service) in the monitoring namespace, to expose these Sidecars as specified below. Service Entries and Virtual Services for each of the Prometheus-Thanos replicas are created as mentioned below with hosts value as respective DNS names.
prometheus-thanos-0.prometheus-thanos-headless-service.monitoring.svc.cluster.local
For each sidecar the following Service Entry and Virtual Service are created.
On the Observer Cluster :
On the Observer cluster, Thanos Querier is deployed with envoy as its sidecar. Using envoy as sidecar is to enable TLS communication between the Observer and Observee clusters as mentioned in the blog below.
https://thanos.io/tip/operating/cross-cluster-tls-communication.md/
To add the Sidecars of the Observee Cluster as stores to the Thanos Querier, in the envoy-config.yaml, the following configuration was used.
When the above configuration is being used, with the Load Balancer URL the both the sidecars of the Observee cluster are getting added to the Thanos Querier as expected.
The issue we are facing is when replacing the Load Balancer URL specified in the above config, with the CNAME Record URL which is mapped to the same Load Balancer URL. The sidecars are not getting added to the Thanos Querier and the logs of the Thanos Querier container show the error below.
rpc error: code = PermissionDenied desc = unexpected HTTP status code received from server: 403 (Forbidden); transport: received unexpected content-type "text/html"" address=172.20.87.222:10001
The corresponding logs of the envoy-sidecar container show the error below,
[2022-06-14 03:42:34.174][22][debug][http] [source/common/http/conn_manager_impl.cc:1435] [C22181][S4225530000374947114] encoding headers via codec (end_stream=false):
':status', '403'
'server', 'envoy'
'date', 'Tue, 14 Jun 2022 03:42:34 GMT'
'content-type', 'text/html'
'content-length', '151'
'cf-ray', '71b00e87992e8558-BOM'
'x-envoy-upstream-service-time', '1'
Beta Was this translation helpful? Give feedback.
All reactions