opentelemetry-helm-charts
opentelemetry-helm-charts copied to clipboard
/var/log/pods/default_nginx_57d......a31f/nginx/0.log: permission denied
AWS EKS 1.21:
$ aws eks describe-cluster --name ...
{
"cluster": {
...
"version": "1.21",
Following your published docs here, I created the following values.yaml
except that I took the liberty to point to the latest image:
$ cat values.yaml
agentCollector:
containerLogs:
enabled: true
image:
repository: otel/opentelemetry-collector-contrib
tag: 0.33.0
command:
name: otelcontribcol
Deployed helm:
$ helm upgrade --install my-opentelemetry-collector open-telemetry/opentelemetry-collector -f values.yaml
Release "my-opentelemetry-collector" has been upgraded. Happy Helming!
NAME: my-opentelemetry-collector
LAST DEPLOYED: Thu Aug 26 23:51:14 2021
NAMESPACE: default
STATUS: deployed
REVISION: 6
TEST SUITE: None
## Double check the image tag:
$ kubectl get ds my-opentelemetry-collector-agent -o yaml | yq e '.spec.template.spec.containers[0].image' -
otel/opentelemetry-collector-contrib:0.33.0
Deploy some app pod:
$ kubectl run nginx --image=nginx
I get the following error:
$ kubectl logs -f --tail=10 ds/my-opentelemetry-collector-agent
...
2021-08-27T03:51:58.232Z error Failed to open file {"kind": "receiver", "name": "filelog", "operator_id": "$.file_input", "operator_type": "file_input", "error": "open /var/log/pods/default_nginx_57d7fc93-dfd8-42e6-8028-d2ea2c9aa31f/nginx/0.log: permission denied"}
@qingvincentyin did you overcome this issue?
securityContext: { runAsUser: 0 }
solves the issue but I'm looking after better solutions than running as root.
@DigasNikas I did what you did to solve my problem, too, on a demo system. I don't know what is supposed to be the official solution. In my opinion, this should be considered a bug in current OpenTelemetry source code because it doesn't work "as is".