This topic describes how to use the BOSH Command Line Interface (CLI) to download logs from the BOSH-deployed VMs in your VMware Tanzu Kubernetes Grid Integrated Edition (TKGI) environment.



Overview

TKGI uses BOSH to deploy the VMs in TKGI environments. For example, the TKGI API VM and the TKGI-provisioned Kubernetes cluster VMs in your environment are BOSH-deployed VMs.

Use the BOSH CLI to download logs from the BOSH-deployed VMs in your environment when troubleshooting or auditing TKGI:



Download Logs

To download logs from a BOSH-deployed VM:

  1. Gather credential and IP address information for your BOSH Director, SSH into the Ops Manager VM, and use the BOSH CLI to log in to the BOSH Director from the Ops Manager VM. For more information, see Advanced Troubleshooting with the BOSH CLI.
  2. After logging in to the BOSH Director, list the names of your BOSH deployments by running:

    bosh -e ENVIRONMENT deployments
    

    Where ENVIRONMENT is your BOSH environment alias.

  3. Identify the names of the VMs that you want to retrieve logs from by listing the VMs in your target BOSH deployment:

    bosh -e ENVIRONMENT -d DEPLOYMENT vms
    

    Where:

    • ENVIRONMENT is the BOSH environment alias.
    • DEPLOYMENT is your target BOSH deployment name. Kubernetes cluster deployment names begin with service-instance_ and include a unique identifier.

    For example, the following command lists the VMs in a Kubernetes cluster:

    $ bosh -e tkgi -d service-instance_ae681cd1-7ff4-4661-b12c-49a5b543f16f vms
    
  4. Download logs from a VM:

    bosh -e ENVIRONMENT -d DEPLOYMENT logs VM-NAME
    

    For example:

    $ bosh -e tkgi \
    -d service-instance_ae681cd1-7ff4-4661-b12c-49a5b543f16f \
    logs master/000a1111-222b-3333-4cc5-de66f7a8899b
    

    For more information about log files, see View Log Files in Using BOSH Diagnostic Commands in Tanzu Kubernetes Grid Integrated Edition.

check-circle-line exclamation-circle-line close-line
Scroll to top icon