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).
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:
To set a BOSH alias for your TKGI environment and log in to the BOSH Director VM, follow the steps below:
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
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.
To SSH into the TKGI API VM using the BOSH CLI, follow the steps below:
Log in to the BOSH Director. For instructions, see Log in to the BOSH Director VM.
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.
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.
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
To SSH into a TKGI Database VM using the BOSH CLI, follow the steps below:
Log in to the BOSH Director. For instructions, see Log in to the BOSH Director VM.
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.
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.
Choose one of the returned TKGI Database VMs as the database VM to SSH into.
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
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:
Log in to the BOSH Director. For instructions, see Log in to the BOSH Director VM.
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.
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.
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
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:
To act as super user on your VM, run the following command:
sudo su
Navigate to the /var/vcap/sys/log
log file directory:
cd /var/vcap/sys/log
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:
kube-apiserver
subdirectory.kubelet
subdirectory.