Installation
Run a Traces database on Kubernetes: pick a deployment mode, declare it as a custom resource, and give each tenant namespace credentials.
This guide assumes the operator is already installed; see Installation. Examples use the telemetry Kubernetes namespace and an S3 bucket named acme-telemetry.
Choose a mode
| Mode | Pods | Storage | Use it for |
|---|---|---|---|
| Standalone | One pod that ingests and queries | A volume, or a bucket | Development and small clusters |
| Reader/writer split | One writer, autoscaled readers | A shared bucket | Heavy query load on modest ingest |
| Sharded | Several writers, a reader group per shard | A shared bucket | Ingest beyond one writer |
The split and sharded modes are the same Sharded resource with one writer or several, so a split deployment grows into a sharded one by raising spec.writer.replicas.
Grant S3 access
Skip this for a standalone database on a volume. Otherwise Traces authenticates to S3 with EKS Pod Identity. The operator creates a ServiceAccount named after the database, traces, so associate an IAM role with it:
aws eks create-pod-identity-association \
--cluster-name prod \
--namespace telemetry \
--service-account traces \
--role-arn arn:aws:iam::123456789012:role/plural-telemetry-traces{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::acme-telemetry"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::acme-telemetry/traces/*"
}
]
}The role's trust policy must allow pods.eks.amazonaws.com to call sts:AssumeRole and sts:TagSession. No keys go in the spec.
Access
Traces serves a tenant namespace only once it has credentials. Each NamespaceAuthentication creates its namespace if needed and grants one username read or write. Create the password Secrets first:
kubectl -n telemetry create secret generic traces-payments-writer \
--from-literal=password="$(openssl rand -hex 24)"
kubectl -n telemetry create secret generic traces-payments-reader \
--from-literal=password="$(openssl rand -hex 24)"Then grant a writer for the collector and a reader for Grafana:
1apiVersion: telemetry.plural.sh/v1alpha12kind: NamespaceAuthentication3metadata:4 name: traces-payments-writer5 namespace: telemetry6spec:71 dataStoreRef: { kind: Traces, name: traces }82 namespace: payments93 username: otel-collector104 permission: write115 secretKeyRef: { name: traces-payments-writer, key: password }12---13apiVersion: telemetry.plural.sh/v1alpha114kind: NamespaceAuthentication15metadata:16 name: traces-payments-reader17 namespace: telemetry18spec:19 dataStoreRef: { kind: Traces, name: traces }20 namespace: payments21 username: grafana22 permission: read23 secretKeyRef: { name: traces-payments-reader, key: password }- 1dataStoreRefThe database this credential is for. One NamespaceAuthentication grants access to exactly one database.
- 2namespaceTenant namespace. It is created on first use; every route is prefixed with
/ns/{namespace}. - 3usernameHTTP basic-auth username. Unique per namespace.
- 4permission
writefor ingest routes,readfor queries. - 5secretKeyRefSecret holding the password, in the same Kubernetes namespace. Rotating it rolls the database's config.
Clients send these as HTTP basic auth.
Connect your tools
Writers serve ingest routes and readers serve queries. In the split and sharded modes, inside the cluster:
| Tool | URL |
|---|---|
| Grafana Tempo data source | http://traces-reader.telemetry:3200/read/ns/payments |
OTel Collector otlphttpThe exporter appends /v1/traces. | http://traces-writer.telemetry:3200/write/ns/payments |
| Zipkin v2 reporters | http://traces-writer.telemetry:3200/write/ns/payments/api/v2/spans |
A standalone database serves both from the one traces Service. Any writer accepts any span and forwards each trace to its shard's owner, so the plain traces-writer Service is all a client needs. For an OTel Collector and Grafana:
extensions:
basicauth/plural:
client_auth:
username: otel-collector
password: ${env:PLURAL_TRACES_PASSWORD}
exporters:
otlphttp/plural-traces:
endpoint: http://traces-writer.telemetry:3200/write/ns/payments
auth:
authenticator: basicauth/plural
service:
extensions: [basicauth/plural]
pipelines:
traces:
exporters: [otlphttp/plural-traces]apiVersion: 1
datasources:
- name: Plural Traces
type: tempo
url: http://traces-reader.telemetry:3200/read/ns/payments
basicAuth: true
basicAuthUser: grafana
secureJsonData:
basicAuthPassword: $PLURAL_TRACES_READ_PASSWORD