Skip to content

Installing on Kubernetes

Prerequisites

Supports installation on both ARM and x86 architectures.

Choose DataWay Data Gateway Address

DataWay is the data gateway for TrueWatch. All data reported by collectors to TrueWatch must pass through the DataWay gateway.

Run the following script to download

wget https://static.guance.com/datakit-v2/datakit.yaml

Modify the datakit.yaml file

  1. Configure the DataWay Data Gateway Address
- name: ENV_DATAWAY
  value: https://openway.guance.com?token=tkn_7f5********fda8681
  1. DataKit enables host-related collectors by default
- name: ENV_DEFAULT_ENABLED_INPUTS
  value: cpu,disk,diskio,mem,swap,system,hostobject,net,host_processes,container

If you need to enable more collectors, simply append them to the above configuration. Of course, you can also remove certain collectors from this list.

  • Collectors enabled by default in TrueWatch:
Collector Name Description
cpu Collects the host's CPU usage
disk Collects disk usage
diskio Collects the host's disk IO
mem Collects the host's memory usage
swap Collects Swap memory usage
system Collects the host operating system load
net Collects host network traffic
host_processes Collects the list of resident processes (alive for more than 10 minutes) on the host
hostobject Collects basic host information (such as operating system information, hardware information, etc.)
container Collects possible container objects and container logs on the host

In DaemonSet mode, DataKit also supports multiple environment variable configurations.

See More Environment Variables.

Execute the following command to install DataKit

kubectl apply -f datakit.yaml

After installation, the system will automatically create a DaemonSet deployment for DataKit.

Check DataKit Running Status

kubectl get pod -n datakit