How to collect TKG cluster logs on TCA:
Collect TCA ogs for:
TCA 2.x, 3.x
Connect to the TCA-CP where the clusters are deployed and change user to root:
Note: Verify You're on the Correct TCA Control Plane (TCA-CP) and make sure make sure you have access to the capv user.
Log in to the cluster using the capv user and the cluster’s floating IP without entering a password :
ssh capv@<cluster-ip>
To confirm the correct SSH key is being used login into management cluster and running this command below:
kubectl get clusters -A
kubectl get cluster -n <namespace> <cluster-name> -o yaml
Look for the id_rsa.pub entry in the output. This public key should match the one configured in the TCA-CP under ~/.ssh/id_rsa.pub.
Note: If you are running this script from a location where you don't have access to SSH keys you will need to enter the password for capv user.
Download the attached tkg_logs.sh script
Note: you will need to run this script as root user and logs will be generated in the /tmp directory.
Make the script executable:
chmod +x tkg_logs.sh
Run the script and, when prompted, enter the floating IP address of the cluster from which you want to collect logs.
./tkg_logs.sh
If you create an ips.txt file, you can list multiple floating IP addresses logs will be collected for each cluster IP specified.
Example:
ips.txt
192.168.0.1192.168.0.2