Skip to content

Commit e90c9bc

Browse files
committed
Fix the documentation about OTEL for multicluster and certs. TRACING-3763
Signed-off-by: Israel Blancas <[email protected]>
1 parent 07d8c34 commit e90c9bc

File tree

1 file changed

+120
-15
lines changed

1 file changed

+120
-15
lines changed

modules/otel-config-multicluster.adoc

Lines changed: 120 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,108 @@
66
[id="gathering-observability-data-from-different-clusters_{context}"]
77
= Gathering the observability data from different clusters with the OpenTelemetry Collector
88

9-
For a multicluster configuration, you can create one OpenTelemetry
10-
Collector instance in each one of the remote clusters and forward all the telemetry
11-
data to one OpenTelemetry Collector instance.
9+
For a multicluster configuration, you can create one OpenTelemetry Collector instance in each one of the remote clusters and then forward all the telemetry data to one OpenTelemetry Collector instance.
1210

1311
.Prerequisites
1412

1513
* The {OTELOperator} is installed.
1614
* The {TempoOperator} is installed.
17-
* A TempoStack is deployed on the cluster.
15+
* A TempoStack instance is deployed on the cluster.
16+
* The following mounted certificates: Issuer, self-signed certificate, CA issuer, client and server certificates. To create any of these certificates, see step 1.
1817
1918
.Procedure
2019

21-
. Create a service account for the OpenTelemetry Collector.
20+
. Mount the following certificates in the OpenTelemetry Collector instance, skipping already mounted certificates.
21+
22+
.. An Issuer to generate the certificates by using the {cert-manager-operator}.
23+
+
24+
[source,yaml]
25+
----
26+
apiVersion: cert-manager.io/v1
27+
kind: Issuer
28+
metadata:
29+
name: selfsigned-issuer
30+
spec:
31+
selfSigned: {}
32+
----
33+
34+
.. A self-signed certificate.
35+
+
36+
[source,yaml]
37+
----
38+
apiVersion: cert-manager.io/v1
39+
kind: Certificate
40+
metadata:
41+
name: ca
42+
spec:
43+
isCA: true
44+
commonName: ca
45+
subject:
46+
organizations:
47+
- Organization # <your_organization_name>
48+
organizationalUnits:
49+
- Widgets
50+
secretName: ca-secret
51+
privateKey:
52+
algorithm: ECDSA
53+
size: 256
54+
issuerRef:
55+
name: selfsigned-issuer
56+
kind: Issuer
57+
group: cert-manager.io
58+
----
59+
60+
.. A CA issuer.
61+
+
62+
[source,yaml]
63+
----
64+
apiVersion: cert-manager.io/v1
65+
kind: Issuer
66+
metadata:
67+
name: test-ca-issuer
68+
spec:
69+
ca:
70+
secretName: ca-secret
71+
----
72+
73+
.. The client and server certificates.
74+
+
75+
[source,yaml]
76+
----
77+
apiVersion: cert-manager.io/v1
78+
kind: Certificate
79+
metadata:
80+
name: server
81+
spec:
82+
secretName: server-tls
83+
isCA: false
84+
usages:
85+
- server auth
86+
- client auth
87+
dnsNames:
88+
- "otel.observability.svc.cluster.local" # <1>
89+
issuerRef:
90+
name: ca-issuer
91+
---
92+
apiVersion: cert-manager.io/v1
93+
kind: Certificate
94+
metadata:
95+
name: client
96+
spec:
97+
secretName: client-tls
98+
isCA: false
99+
usages:
100+
- server auth
101+
- client auth
102+
dnsNames:
103+
- "otel.observability.svc.cluster.local" # <2>
104+
issuerRef:
105+
name: ca-issuer
106+
----
107+
<1> List of exact DNS names to be mapped to a solver in the server OpenTelemetry Collector instance.
108+
<2> List of exact DNS names to be mapped to a solver in the client OpenTelemetry Collector instance.
109+
110+
. Create a service account for the OpenTelemetry Collector instance.
22111
+
23112
.Example ServiceAccount
24113
[source,yaml]
@@ -106,19 +195,24 @@ spec:
106195
exporters:
107196
otlphttp:
108197
endpoint: https://observability-cluster.com:443 # <1>
109-
insecure: false
110-
compression: on
111198
tls:
112-
cert_file: "/path/to/server-cert.pem"
113-
key_file: "/path/to/server-key.pem"
114-
client_ca_file: "/path/to/client-ca.pem"
115-
199+
insecure: false
200+
cert_file: /certs/server.crt
201+
key_file: /certs/server.key
202+
ca_file: /certs/ca.crt
116203
service:
117204
pipelines:
118205
traces:
119206
receivers: [jaeger, opencensus, otlp, zipkin]
120207
processors: [memory_limiter, k8sattributes, resourcedetection, batch]
121208
exporters: [otlp]
209+
volumes:
210+
- name: otel-certs
211+
secret:
212+
name: otel-certs
213+
volumeMounts:
214+
- name: otel-certs
215+
mountPath: /certs
122216
----
123217
<1> The Collector exporter is configured to export OTLP HTTP and points to the OpenTelemetry Collector from the central cluster.
124218

@@ -136,18 +230,21 @@ spec:
136230
mode: "deployment"
137231
ingress:
138232
type: route
139-
hostname: "observability-cluster.com"
140233
route:
141-
termination: "edge"
234+
termination: "passthrough"
142235
config: |
143236
receivers:
144237
otlp:
145238
protocols:
146239
http:
240+
tls: # <1>
241+
cert_file: /certs/server.crt
242+
key_file: /certs/server.key
243+
client_ca_file: /certs/ca.crt
147244
exporters:
148245
logging:
149246
otlp:
150-
endpoint: "tempo-<simplest>-distributor:4317" # <1>
247+
endpoint: "tempo-<simplest>-distributor:4317" # <2>
151248
tls:
152249
insecure: true
153250
service:
@@ -156,5 +253,13 @@ spec:
156253
receivers: [otlp]
157254
processors: []
158255
exporters: [otlp]
256+
volumes:
257+
- name: otel-certs
258+
secret:
259+
name: otel-certs
260+
volumeMounts:
261+
- name: otel-certs
262+
mountPath: /certs
159263
----
160-
<1> The Collector exporter is configured to export OTLP and points to the Tempo distributor endpoint, which in this example is `"tempo-simplest-distributor:4317"` and already created.
264+
<1> The Collector receiver requires the certificates listed in the first step.
265+
<2> The Collector exporter is configured to export OTLP and points to the Tempo distributor endpoint, which in this example is `"tempo-simplest-distributor:4317"` and already created.

0 commit comments

Comments
 (0)