• Home
  • Deploy Dynatrace
  • Set up Dynatrace on container platforms
  • Kubernetes
  • Other configuration options for Kubernetes/OpenShift
  • Instrument ingress-nginx for Kubernetes/OpenShift

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.

Prerequisites

  • 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.

  1. Edit the ConfigMap.

    Example:

    bash
    kubectl edit configmap ingress-nginx-controller
  2. Add the following value to the main-snippet key (below data).

    Example:

    bash
    data: main-snippet: load_module /opt/dynatrace/oneagent/agent/bin/current/linux-musl-x86-64/liboneagentnginx.so;

    Note: For cloudNativeFullStack deployments, the path becomes:

    bash
    data: main-snippet: load_module /opt/dynatrace/oneagent-paas/agent/bin/current/linux-musl-x86-64/liboneagentnginx.so;

Troubleshoot

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 initialDelaySeconds for these probes.
Related topics
  • Kubernetes/OpenShift monitoring

    Monitor Kubernetes/OpenShift with Dynatrace.