IBM Cloud Docs
Observing Istio traffic

Observing Istio traffic

Log and monitor your apps that are managed by Istio on IBM Cloud Kubernetes Service.

Enabling access logs for the entire mesh

To enable Envoy access logs for the entire mesh, you can use the managed-istio-custom ConfigMap resource, which is located in the ibm-operators namespace that is provided by the Istio add-on. To enable Envoy access logs, edit the managed-istio-custom ConfigMap resource and add the key-value pair istio-global-proxy-accessLogFile: "dev/stdout". For more information, see Customizing the Istio installation.

Enabling access logs for individual containers

Starting from version 1.18, the Istio add-on provides the option to enable Envoy access logs for individual containers by using telemetry CRs. To set up telemetry CRs, use the following telemetry definition.

apiVersion: telemetry.istio.io/v1alpha1
kind: Telemetry
metadata:
  name: example-telemetry-enabling-envoy-access-logs
  namespace: <namespace> # Pod's namespace
spec:
  selector:
    matchLabels:
      <key>: <value> # Pod's label
  accessLogging:
  - providers:
    - name: enable-targeted-envoy-access-logs    

Modify the previous example definition to contain your Pod's namespace and label. After the telemetry definition is applied, you can see Envoy access logs through the istio-proxy container.

Setting up logging with IBM Log Analysis

Seamlessly manage logs for your app container and the Envoy proxy sidecar container in each pod by deploying Log Analysis agents to your worker nodes to forward logs to IBM® Log Analysis.

To use IBM Log Analysis, you deploy a logging agent to every worker node in your cluster. This agent collects logs with the extension *.log and extensionless files that are stored in the /var/log directory of your pod from all namespaces, including kube-system. These logs include logs from your app container and the Envoy proxy sidecar container in each pod. The agent then forwards the logs to the IBM Log Analysis service.

To get started, set up logging for your cluster by following the steps in Managing Kubernetes cluster logs with IBM Log Analysis.

Setting up monitoring with IBM Cloud Monitoring

Gain operational visibility into the performance and health of your Istio-managed apps by deploying a Monitoring agent to your worker nodes to forward metrics to IBM Cloud® Monitoring.

To deploy monitoring agents to your cluster, complete the following steps.

  1. Provision an instance of IBM Cloud Monitoring.

  2. Configure a monitoring agent in your cluster.

  3. In the Monitoring console, click Open Dashboard for the instance that you provisioned.

  4. In the Monitoring UI, click Add new dashboard.

  5. Search for Istio and select one of the Monitoring predefined Istio dashboards.

For more information about referencing metrics and dashboards, monitoring Istio internal components, and monitoring Istio A/B deployments and canary deployments, check out the How to monitor Istio, the Kubernetes service mesh blog post.

Launching the ControlZ component inspection and Envoy sidecar dashboards

To inspect specific components of Istio, launch the ControlZ and Envoy dashboards.

The ControlZ dashboard accesses the Istio component ports to provide an interactive view into the internal state of each component. The Envoy dashboard provides configuration information and metrics for an Envoy sidecar proxy that runs in an app pod.

Before you begin

ControlZ

  1. Get the pod name for the Istio component that you want to inspect. You can inspect the component pods for istio-citadel, istio-galley, istio-pilot, istio-policy, and istio-telemetry.

    kubectl get pods -n istio-system | grep istio
    

    Example output

    NAME                                      READY   STATUS    RESTARTS   AGE
    istio-citadel-869c7f9498-wtldz            1/1     Running   0          2m
    istio-egressgateway-69bb5d4585-qxxbp      1/1     Running   0          2m
    istio-galley-75d7b5bdb9-c9d9n             1/1     Running   0          2m
    istio-ingressgateway-5c8764db74-gh8xg     1/1     Running   0          2m
    istio-pilot-55fd7d886f-vv6fb              2/2     Running   0          2m
    istio-policy-6bb6f6ddb9-s4c8t             2/2     Running   0          2m
    istio-sidecar-injector-7d9845dbb7-r8nq5   1/1     Running   0          2m
    istio-telemetry-7695b4c4d4-tlvn8          2/2     Running   0          2m
    istio-tracing-55bbf55878-z4rd2            1/1     Running   0          2m
    
  2. Access the ControlZ dashboard for that component.

    istioctl dashboard controlz <component_pod_name>.istio-system
    

Envoy

  1. Get the name of the app pod where you want to inspect the Envoy sidecar container.
    kubectl get pods -n <namespace>
    
  2. Access the Envoy dashboard for that pod.
    istioctl dashboard envoy <pod-name>.<namespace>