How to change log level for istio-proxy within a Deployment?
Environment
- OpenShift Container Platform
- 4.9 and later
- Red Hat OpenShift Service Mesh
- 2.1 and later
Issue
- How to change log level for
istio-proxywithin aDeployment? - Need to enable verbose logging for
istio-proxyfor troubleshooting purposes.
Resolution
-
Changing
istio-proxylog level in yourDeploymentby adding theannotationsidecar.istio.io/logLevel:$ oc edit deployment $<DEPLOYMENT_NAME> [...] spec: template: metadata: annotations: "sidecar.istio.io/logLevel": debug # level can be: trace, debug, info, warning, error, critical, offNote:- The
annotationsidecar.istio.io/logLevelwill get the log level only for theistio-proxywhich wraps theenvoylogs as well. -
The pod will restart after changing the
annotation.
Root Cause
For debugging reasons, sometimes the log level needs to be adjusted to a more verbose level.
Diagnostic Steps
-
After change the log level use the following command to check the
istio-proxylog:$ 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.
Comments