How to enable envoy access logging in Rancher v2.5 deployed Istio

Follow
Table of Contents

Task

This article details how to enable Envoy's access logging, for Rancher deployed Istio, in Rancher v2.5.

Pre-requisites

  • A Kubernetes cluster managed by Rancher v2.5, with Istio enabled

Resolution

Access logging can be enabled for Envoy, in Rancher v2.5 deployed Istio, by setting the meshConfig.accessLogFile path, via an IstioOperator Custom Overlay File, when deploying the Istio chart.

An example of a minimal overlay file, to enable envoy access logging is as follows:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  meshConfig:
    accessLogFile: /dev/stdout

Optionally, accessLogEncoding and accessLogFormat can be set, to control the encoding and format of the log output.

Enabling access logging on a new Istio deployment

  1. Navigate to the Cluster Explorer, within the Rancher UI, for the relevant cluster
  2. In the Cluster Explorer menu, in the top-left, click Apps & Marketplace
  3. Select the Istio chart
  4. Select System under Install into Project
  5. Select Custom Overlay File and enter the IstioOperator definition, per the example above, into the form
  6. Click Install

Enabling access logging on an existing Istio deployment

  1. Navigate to the Cluster Explorer, within the Rancher UI, for the relevant cluster
  2. In the Cluster Explorer menu, in the top-left, click Apps & Marketplace
  3. Click Installed Apps
  4. Click the vertial elipses next to rancher-istio in the istio-system Namespace and click Edit/Upgrade
  5. Select Custom Overlay File and enter the IstioOperator definition, per the example above, into the form
  6. Click Upgrade

Validating the access log configuration

After enabling access logging, you can test the configuration with the Istio sleep and httpbin sample applications, per the Istio documentation.

Further reading

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.