This topic describes how to access information about your VMware Tanzu Kubernetes Grid Integrated Edition deployment by using the BOSH Command Line Interface (BOSH CLI).

Overview

BOSH diagnostic commands such as bosh ssh and bosh vms enable you to access information about your Tanzu Kubernetes Grid Integrated Edition deployment. For example, you can access Tanzu Kubernetes Grid Integrated Edition log files after SSHing into the TKGI API or a Kubernetes cluster VM:

  1. SSH into the TKGI API VM or SSH into a Kubernetes Cluster VM
  2. View Log Files

Log in to the BOSH Director VM

To set a BOSH alias for your Tanzu Kubernetes Grid Integrated Edition environment and log in to the BOSH Director VM, follow the steps below:

  1. Gather your credential and IP address information for the BOSH Director and SSH into the Ops Manager VM. For instructions, see Advanced Troubleshooting with the BOSH CLI.
  2. To create a BOSH alias for your Tanzu Kubernetes Grid Integrated Edition environment, run the following command:

    bosh alias-env ENVIRONMENT 
    -e BOSH-DIRECTOR-IP
    –ca-cert /var/tempest/workspaces/default/root_ca_certificate
    Where:

    • ENVIRONMENT is an alias of your choice. For example, tkgi.
    • BOSH-DIRECTOR-IP is the BOSH Director IP address you located in the first step. For example, 10.0.0.3.

    For example:

    $ bosh alias-env tkgi -e 10.0.0.3 
    –ca-cert /var/tempest/workspaces/default/root_ca_certificate

  3. To log in to the BOSH Director using the alias you set, run the following command:

    bosh -e ENVIRONMENT login

    For example:

    $ bosh -e tkgi login
    Alternatively, you can set the BOSH environment variables on the Ops Manager VM to authenticate with the BOSH Director VM. For more information, see Authenticate with the BOSH Director VM in Advanced Troubleshooting with the BOSH CLI in the Ops Manager documentation.

SSH into the TKGI API VM

To SSH into the TKGI API VM using the BOSH CLI, follow the steps below:

  1. Log in to the BOSH Director. For instructions, see Log in to the BOSH Director VM.

  2. To identify your TKGI deployment name, run the following command:

    bosh -e ENVIRONMENT deployments

    Where ENVIRONMENT is your BOSH environment alias.

    For example:

    $ bosh -e tkgi deployments
    Your TKGI deployment name begins with pivotal-container-service and includes a BOSH-generated identifier.

  3. To identify your TKGI API VM name, run the following command:

    bosh -e ENVIRONMENT -d DEPLOYMENT vms

    Where:

    • ENVIRONMENT is the BOSH environment alias.
    • DEPLOYMENT is your TKGI deployment name.

    For example:

    $ bosh -e tkgi -d pivotal-container-service-a1b2c333d444e5f66a77 vms

    Your TKGI API VM name begins with pivotal-container-service and includes a BOSH-generated identifier.

    Note: The TKGI API VM identifier is different from the identifier in your TKGI deployment name.

  4. To SSH into the TKGI API VM, run the following command:

    bosh -e ENVIRONMENT -d DEPLOYMENT ssh TKGI-API-VM

    Where:

    • ENVIRONMENT is the BOSH environment alias.
    • DEPLOYMENT is your TKGI deployment name.
    • TKGI-API-VM is your TKGI API VM name.

    For example:

    $ bosh -e tkgi 
    -d pivotal-container-service-a1b2c333d444e5f66a77
    ssh pivotal-container-service/000a1111-222b-3333-4cc5-de66f7a8899b

SSH into the TKGI Database VM

To SSH into a TKGI Database VM using the BOSH CLI, follow the steps below:

  1. Log in to the BOSH Director. For instructions, see Log in to the BOSH Director VM.

  2. To identify your TKGI deployment name, run the following command:

    bosh -e ENVIRONMENT deployments

    Where ENVIRONMENT is your BOSH environment alias.

    For example:

    $ bosh -e tkgi deployments
    Your TKGI deployment name begins with pivotal-container-service and includes a BOSH-generated identifier.

  3. To identify your TKGI Database VM names, run the following command:

    bosh -e ENVIRONMENT -d DEPLOYMENT vms

    Where:

    • ENVIRONMENT is the BOSH environment alias.
    • DEPLOYMENT is your TKGI deployment name.

    For example:

    $ bosh -e tkgi -d pivotal-container-service-a1b2c333d444e5f66a77 vms

    Your TKGI Database VM names begin with pks-db and include a BOSH-generated identifier.

  4. Choose one of the returned TKGI Database VMs as the database VM to SSH into.

  5. To SSH into the selected TKGI Database VM, run the following command:

    bosh -e ENVIRONMENT -d DEPLOYMENT ssh TKGI-DB-VM

    Where:

    • ENVIRONMENT is the BOSH environment alias.
    • DEPLOYMENT is your TKGI deployment name.
    • TKGI-DB-VM is the name of the TKGI Database VM to SSH into.

    For example:

    $ bosh -e tkgi \
    -d pivotal-container-service-a1b2c333d444e5f66a77 \
    ssh pks-db/000a4444-555b-6666-4cc5-de66f8a9900b

SSH into a Kubernetes Cluster VM

Each Kubernetes cluster corresponds to a BOSH deployment. To SSH into a TKGI-provisioned Kubernetes cluster VM using the BOSH CLI, follow the steps below:

  1. Log in to the BOSH Director. For instructions, see Log in to the BOSH Director VM.

  2. To identify your Kubernetes cluster deployment name, run the following command:

    bosh -e ENVIRONMENT deployments

    Where ENVIRONMENT is your BOSH environment alias.

    For example:

    $ bosh -e tkgi deployments
    Kubernetes cluster deployment names begin with service-instance and include a BOSH-generated identifier.

  3. To identify your Kubernetes cluster VM name, run the following command:

    bosh -e ENVIRONMENT -d DEPLOYMENT vms

    Where:

    • ENVIRONMENT is the BOSH environment alias.
    • DEPLOYMENT is your Kubernetes cluster deployment name.

    For example:

    $ bosh -e tkgi -d service-instance_ae681cd1-7ff4-4661-b12c-49a5b543f16f vms
    Each Kubernetes cluster VM name begins with master or worker and includes a BOSH-generated identifier.

  4. To SSH into your Kubernetes cluster VM, run the following command:

    bosh -e ENVIRONMENT -d DEPLOYMENT ssh CLUSTER-VM

    Where:

    • ENVIRONMENT is the BOSH environment alias.
    • DEPLOYMENT is your Kubernetes cluster deployment name.
    • CLUSTER-VM is your Kubernetes cluster VM name, either master/VM-ID or worker/VM-ID.

    For example:

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

View Log Files

Log files contain error messages and other information you can use to diagnose issues with your Tanzu Kubernetes Grid Integrated Edition deployment. To access Tanzu Kubernetes Grid Integrated Edition log files, SSH into the TKGI API VM, or a Kubernetes cluster VM, and then follow the steps below:

  1. To act as super user on your VM, run the following command:

    sudo su

  2. Navigate to the /var/vcap/sys/log log file directory:

    cd /var/vcap/sys/log

  3. Examine the contents of the /var/vcap/sys/log directory. For example, when diagnosing issues with a Kubernetes cluster VM, you may want to review the following log files:

    • On a control plane VM, examine the kube-apiserver subdirectory.
    • On a worker VM, examine the kubelet subdirectory.
check-circle-line exclamation-circle-line close-line
Scroll to top icon