Procedure for enabling DEBUG in a container/kubernetes environment

Add a ConfigMap to the agent yaml like this:

apiVersion: v1
kind: ConfigMap
metadata:
name: instana-agent-config
namespace: instana-agent
data:
org.ops4j.pax.logging.cfg: |
log4j2.logger.instana.level=DEBUG```
and then add a volume mount to the agent:
```volumes:
- name: config
configMap:
name: instana-agent-config```
and:
```volumeMounts:
... other mounts ...
- name: config
mountPath: /mnt/config```

and then add a command to first copy these overrides into the right place and then start the container:
```command:
- bash
- -c
- 'cp /mnt/config/*.cfg /root && /opt/instana/agent/bin/run.sh'```

Note - A variation of this can be used for changing any config in the agent, not just logging. just put a key in the ConfigMap for that file and the full content for the file after the pipe.

Have more questions? Submit a request

Comments