How to change log level for istio-proxy within a deployment?

Solution Verified - Updated -

Environment

  • Openshift Container Platform
    • 4.x
  • Red Hat Openshift Service Mesh
    • 2.x

Issue

  • How to change log level for istio-proxywithin a deployment?
  • Need to enable verbose logging for istio-proxy for troubleshooting purposes.

Resolution

  • Changing istio-proxy log level in your deployment by adding the annotation sidecar.istio.io/logLevel:
# oc edit deployment $<DEPLOYMENT_NAME>

...omitted
  template:
    metadata:
      annotations:
        "sidecar.istio.io/logLevel": debug # level can be: trace, debug, info, warning, error, critical, off

The pod will restart after changing the annotation.

Root Cause

For debugging reasons, sometimes the log level needs to be adjusted to verbose

Diagnostic Steps

  • After change the log level use the following command to check the istio-proxy log
# oc logs $<POD_NAME> -c istio-proxy

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.