• Cloud-Native Container ProductsCloud-Native Container Products
    • KubeSphere Enterprisehot
    • KubeSphere Virtualizationhot
    • KubeSphere Enterprise HCI
  • Cloud-Native ServiceCloud-Native Service
    • KubeSphere Backuphot
    • KubeSphere Litenew
    • KubeSphere Inspectornew
  • Public Cloud Container ServicePublic Cloud Container Service
    • KubeSphere on AWS
    • KubeSphere on DigitalOcean

Enable and disable logging

Describes how to enable and disable logging for a KubeSphere Virtualization (KSV) cluster.

The Logs module is encapsulated into the main installation package of KSV. If you want to use the logging feature, you can use the CLI tool to enable logging without the need to download a separate feature package. If logging is no longer needed, you can disable this feature. This topic describes how to enable and disable logging for KSV.

Prerequisites

KSV is installed. For more information, see Install KSV in single-node mode and Install KSV in multi-node mode.

Procedure

  1. Log in to the server node on which KSV is installed as user root. If you install KSV in multi-node mode, log in to one of the server nodes on which KSV is installed.

  2. Run the following command to enable logging:

    kubectl -n kubesphere-system patch cc ks-installer --type merge --patch '{"spec":{"logging":{"enabled":true},"auditing":{"enabled":true}}}'
  3. If logging is no longer needed, run the following command to disable this feature:

    kubectl -n kubesphere-system patch cc ks-installer --type merge --patch '{"spec":{"logging":{"enabled":false},"auditing":{"enabled":false}}}'

KubeSphere ®️ © QingCloud Technologies 2022