- Documentation
Torch Log Service
User Guide
Data collection
LogCollector collection
Installation and upgrade
Install LogCollector (Sidecar deployment)
Installation and upgrade
Install LogCollector (Sidecar deployment)
Install LogCollector (Sidecar deployment)
This topic introduces how to install LogCollector in a Kubernetes cluster using Sidecar deployment.
Background information
LogCollector that is installed in Sidecar mode only supports collecting text logs from other containers within the same Pod. It does not support collecting container standard output or collecting text logs and standard output from containers in other pods.
When creating collection rules, do not enable container log collection.
The installation process includes the following steps:
- Create a ConfigMap for LogCollector.
- Create LogCollector Sidecar.
The IAM user has been created, and the Access Key ID and Secret Access Key have been obtained. Besides, the user is granted at least the TLSLogCollectorAccess permission policy. For details about permissions, see IAM overview. Log in to the Kubernetes cluster where LogCollector needs to be installed; install LogCollector using Sidecar deployment according to the following steps.
Create a Namespace for LogCollector.
- Create a YAML file named logcollector_ns.yaml.
- Enter the following content in the YAML file.
- The parameters are described below:
- Run the following command to apply the Namespace configuration.
2 Create ConfigMap
Create a ConfigMap for LogCollector.
- Create a YAML file named logcollector_config.yaml .
- Edit the YAML file and enter the following script in it.
- Configure the relevant parameters in the script based on actual needs.
- The parameters are described below:
- Run the following command to apply the ConfigMap configuration.
3 Create Sidecar
Create a Sidecar for LogCollector to collect text logs from other containers within the same Pod.
- Create a YAML file named logcollector_sc.yaml.
- Enter the following in the YAML file, and set the parameters based on your actual needs.
- Run the following command to apply the configuration. Replace the file name as needed.
LogCollector image address
The latest LogCollector image addresses provided by Torch log service (TLS) in each region are as follows:
Replace the Region ID in the image address with the actual region ID for your environment. For example, the region ID for North China 2 (Beijing) is cn-beijing. For supported regions, see Service address list.
Last updated: 2026.09.11 14:34:03