This site will be decommissioned on December 31st 2024. After that date content will be available at techdocs.broadcom.com.

This topic describes how to access information about your VMware Tanzu Kubernetes Grid Integrated Edition (TKGI) 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 TKGI deployment. For example, you can access TKGI log files after SSHing into the TKGI API or a Kubernetes cluster VM:

  1. Log in to the BOSH Director VM
  2. SSH into the environment:
  3. View Log Files



Log in to the BOSH Director VM

To set a BOSH alias for your TKGI 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 TKGI 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:

    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:

    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:

    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 TKGI deployment. To access TKGI 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 might 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