Accessing Logs from Kubernetes Pods

This guide is intended for Operations Managers and Webmasters. It explains how to access and view OTLP-formatted logs generated by applications running in Kubernetes pods. These logs can be viewed directly through the pod console.

Prerequisites

  • Access to the Kubernetes cluster where the application is deployed.

  • Permissions to view pod logs

Steps

  1. Identify the pod running the application.

    kubectl get pods -n expertflow
    
  2. View logs for a specific pod:

    kubectl logs <pod-name> -n expertflow
    

    Replace <pod-name> with the pod you want to inspect.

  3. Filter logs (optional)

    1. audit logs

      kubectl logs <pod-name> -n <namespace> | grep "audit_logging"
      
    2. tracing logs

      kubectl logs <pod-name> -n <namespace>  | grep "tracing"