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
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.
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}}}'
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}}}'