T4K Log Collector Plugin
This page describes how to setup the T4K log collector and collect logs for support analysis
tvk-log-collector collects the logs, config and events of resources. Pod Logs can help you understand what is happening inside your application. The logs are particularly useful for debugging problems and monitoring cluster activity, alongside the metadata of all resources related to Trilio as either namespaced by providing namespaces name separated by comma or clustered from k8s cluster for debugging k8s-triliovault application. It also collects the CRDs yaml related to T4K and zip them.
Pre-requisites:
krew - kubectl-plugin manager. Install from here
kubectl - kubernetes command-line tool. Install from here
Supported OS and Architectures:
linux/amd64
linux/x86
linux/arm
linux/arm64
darwin/amd64
darwin/arm64
windows/amd64
Installation, Upgrade, Removal of Plugins :
With krew
:
krew
:Add T4K custom plugin index of krew:
Installation:
Upgrade:
Removal:
Without krew
:
krew
:List of available releases: https://github.com/trilioData/tvk-plugins/releases
Choose a version of log-collector plugin to install and check if release assets have log-collector plugin's package [log-collector_${version}${OS}${ARCH}.tar.gz] for your desired OS & Architecture.
To check OS & Architecture, execute command
uname -a
on linux/macOS andsysteminfo
on windows
Set env variable
version=v1.x.x
[update with your desired version]. Ifversion
is not exported,latest
tagged version will be considered.
Linux/macOS
Bash or ZSH shells
Verify installation with kubectl tvk-log-collector --help
Windows
Download
log-collector_${version}_windows_${ARCH}.zip
from the Releases page to a directory and unzip the package.Launch a command prompt (log-collector.exe).
Note for Dark Site Installation
Krew plugin installation is not required, as it is a part of Dark Site Installer Package.
Usage:
Flags:
Parameter | Default | Description |
---|---|---|
--clustered | false | whether clustered installation of trilio application |
--namespaces | [] | list of namespaces to look for resources separated by commas |
--kubeconfig | ~/.kube/config | path to the kubernetes config |
--keep-source-folder | false | Keep source directory and Zip both |
--log-level | INFO | log level for debugging ( INFO ERROR DEBUG WARNING DEBUG ) |
--config-file | path to config file for log collector inputs | |
--gvk | json string to give list of GVKs that want be collected other than log collector handles | |
--label-selector | json string to give list of all label selector for resources to be collected other than log collector collects |
Examples
To collect logs & YAML from multiple namespaces (separated by commas in double quotes):
To collect logs & YAML from all over the cluster:
To collect logs with log level error and to keep the folder with & without zip:
To collect logs by providing object gvk which log collector doesn't collect by default :
To collect object logs by providing labels which log collector doesn't collect by default :
To collect logs by providing config file :
The format of data in a file should be according to the below example:
Run a log collector with predefined values using a sample file. Download the file using below commands:
By wget
By curl
Output
This command will create triliovault-<date-time>.zip
zip file containing cluster debugging information.
Resources Considered for Log Collection:
When clustered flag enabled:
and Trilio Resources
OCP Specific Resources Considered for Log Collection:
Last updated