Instrument ingress-nginx for Kubernetes/OpenShift
The instructions below are relevant only for the official Kubernetes ingress controller implementation from Google.
Derivatives from the official project, such as the Bitnami ingress controller, are not supported. However, you may instrument them manually by using the Manual runtime instrumentation for NGINX.
The ingress controller implementation from F5 NGINX can be instrumented automatically; no manual steps are required.
The NGINX process of the official Kubernetes ingress-nginx controller container image can't be instrumented automatically. To manually instrument ingress-nginx on Kubernetes, follow the instructions below.
- OneAgent version 1.227+
Instrument Kubernetes ingress-nginx
To instrument ingress-nginx on Kubernetes, you need to load the NGINX module manually via a ConfigMap.
Note: OneAgent needs to be running when the ingress-nginx ConfigMap changes are being applied, otherwise NGINX won't start.
Edit the ConfigMap.
kubectl edit configmap ingress-nginx-controller
Add the following value to the
data: main-snippet: load_module /opt/dynatrace/oneagent/agent/bin/current/linux-musl-x86-64/liboneagentnginx.so;
cloudNativeFullStackdeployments, the path becomes:bash
data: main-snippet: load_module /opt/dynatrace/oneagent-paas/agent/bin/current/linux-musl-x86-64/liboneagentnginx.so;
If your pod isn't up and running, make sure that it hasn't exceeded either of the following:
- Its resource quota (especially for memory).
- The initial liveness/readiness probe timeouts. You might need to increase
initialDelaySecondsfor these probes.