This article explains how to retrieve Kubernetes pod logs for troubleshooting backend services in Tanzu Hub, and clarifies which Tanzu Hub virtual machine should be used for running kubectl.
Tanzu Hub is delivered as a BOSH-managed appliance.
Internally, Tanzu Hub backend components (such as GraphQL or postgres services) run as containers orchestrated by Kubernetes.
While this Kubernetes runtime is not exposed to end users for management purposes, access to pod logs may be required during advanced troubleshooting (for example, when diagnosing attach failures, certificate validation errors, or backend service errors).
Not all virtual machines in the Tanzu Hub deployment have sufficient Kubernetes permissions to retrieve pod logs.
For troubleshooting purposes, kubectl access with appropriate permissions is available on the Tanzu Hub registry VM.
This VM is preconfigured with an administrative Kubernetes context and is the supported entry point for retrieving Tanzu Hub pod logs.
Tanzu Hub
From a system with BOSH access:
Identify the VM with a name similar to:
On the registry VM, kubectl is already configured and authorized.
Examples:
List namespaces:
List pods across all namespaces:
Retrieve logs from a specific pod:
Follow logs while reproducing an issue:
kubectl may fail on other VMs
If kubectl is run from a control/* VM, the following error may be observed: