tencent cloud

Feedback

Installing LogListener in Self-built Kubernetes Cluster

Last updated: 2022-10-13 14:36:07

    This document describes how to install LogListener on a self-built Kubernetes cluster to collect logs to CLS.
    During the installation process, the system automatically performs the following operations:

    1. Create a CLS-logconfigs CRD.
    2. Deploy cls-provisioner.
    3. Install LogListener in DaemonSet mode.

    Directions

    1. Log in to the Kubernetes cluster.
    2. Run the following commands in sequence to install cls-provisioner Helm.
      
      wget https://mirrors.tencent.com/install/cls/k8s/tencentcloud-cls-k8s-install.sh
      
    chmod 744 tencentcloud-cls-k8s-install.sh
    
    ./tencentcloud-cls-k8s-install.sh --region xxx --secretid xxx --secretkey xxx 
    

    When the installation is completed, CLS automatically creates a default machine group named cls-k8s-Random ID.

    Note:

    Before installing cls-provisioner Helm, check that the Helm CLI is already installed in the Kubernetes cluster. For more information, see Installing Helm.

    Parameters

    • --secretid: Tencent Cloud account access key ID.
    • --secretkey: Tencent Cloud account access key.
    • --region: CLS region.
    • --docker_root: The root directory of the cluster's Docker, which is /var/lib/docker by default.
    • --cluster_id: Cluster ID.
      Note:

      • We recommend you use different cluster_id values for different clusters.
      • Data of different clusters can be shipped to the same topic.
      • The default ID is in the following format: cls-k8s-Random ID consisting of 8 characters.
    • --network: Network type, which can be private network (default) or internet.
    • --api_network: TencentCloud API network type, which can be private network or internet (default).
    • --api_region: TencentCloud API region. For more information, see Available Regions.
    • Keep region and api_region the same. For more information, see LogListener and CLS API 3.0.

    Sample

    Deploying LogListener in the Beijing region

    ./tencentcloud-cls-k8s-install.sh --secretid xxx --secretkey xx --region ap-beijing  --network internet --api_region ap-beijing
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support