This topic describes how to access logs collected by Tanzu Kubernetes Grid.
Tanzu Kubernetes Grid collects logs for standalone management cluster and workload cluster deployment and operation. To retrieve audit logs at the Kubernetes API or Linux system level, see Audit Logging.
Local cluster logs capture the standalone management and workload cluster creation, upgrade, and deletion activity in the
~/.config/tanzu/tkg/logs/CLUSTER-NAME file. These logs can be used to troubleshoot the cluster creation activity and other failures. Successfully deleting a cluster automatically deletes its logs file, but if the delete action fails, the logs file remains and can be reviewed by the user or support team.
If local cluster logs do not provide sufficient information to monitor deployments or troubleshoot component failure, you can retrieve logs using
kubectl as follows.
To monitor and troubleshoot standalone management cluster deployments, review:
The log file listed in the terminal output under Logs of the command execution can also be found at…
The log from your cloud provider module for Cluster API. Retrieve the most recent one as follows:
tanzu management-cluster createoutput for Bootstrapper created. Kubeconfig: and copy the
kubeconfigfile path listed. The file is in
kubectl logs deployment.apps/capv-controller-manager -n capv-system manager --kubeconfig </path/to/kubeconfig>
kubectl logs deployment.apps/capa-controller-manager -n capa-system manager --kubeconfig </path/to/kubeconfig>
kubectl logs deployment.apps/capz-controller-manager -n capz-system manager --kubeconfig </path/to/kubeconfig>
To troubleshoot Supervisor, see Troubleshooting Supervisor Enablement in the vSphere with Tanzu documentation.
tanzu cluster create, you can monitor the deployment process in the Cluster API logs on the management cluster.
To access these logs, follow the steps below:
kubeconfig to your management cluster. For example:
kubectl config use-context my-management-cluster-admin@my-management-cluster
Run the following:
kubectl logs deployments/capi-controller-manager -n capi-system manager
kubectl logs deployments/capv-controller-manager -n capv-system manager
kubectl logs deployments/capa-controller-manager -n capa-system manager
kubectl logs deployments/capz-controller-manager -n capz-system manager
You can configure logging and monitoring on workload clusters created by Tanzu Kubernetes Grid: