Collecting Kubernetes Audit Logs
CCE supports logging for master nodes. On the Control Plane Audit Logs tab of Logging, you can determine whether to report Kubernetes audit logs to LTS.
Constraints
- The cluster version must be v1.21.7-r0 or later, v1.23.5-r0 or later, or 1.25.
- There is required LTS resource quota. For details about the default LTS quota, see Basic Resources.
Kubernetes Audit Logs
Log Type |
Component |
Log Stream |
Description |
---|---|---|---|
Control plane audit logs |
audit |
audit-{{clusterID}} |
An audit log is a chronological record of user operations on Kubernetes APIs and control plane activities for security. |
Enabling Control Plane Audit Logging
Enabling control plane audit logging during cluster creation
- Log in to the CCE console.
- In the upper right corner, click Buy Cluster. Then, configure the parameters and click Next: Select Add-on.
- On the displayed page, select Cloud Native Logging and click Next: Add-on Configuration.
- On the displayed page, select Kubernetes Audit Logs for Cloud Native Logging.
Figure 1 Enabling audit logging during cluster creation
- Click Next: Confirm Configuration.
- Log in to the CCE console and click the cluster name to access the cluster console. In the navigation pane, choose Logging.
- Click the Control Plane Audit Logs tab, select the audit component, and click Enable.
Figure 2 Enabling control plane audit logging for an existing cluster
Viewing Control Plane Audit Logs
Viewing control plane audit logs on the CCE console
- Log in to the CCE console and click the cluster name to access the cluster console. In the navigation pane, choose Logging.
- Click the Control Plane Audit Logs tab to view audit logs in the cluster. For details about related operations, see LTS User Guide.
Figure 3 Viewing control plane audit logs on the CCE console
Viewing control plane audit logs on the TLS console
- Log in to the LTS console and choose Log Management.
- Search for the log group by cluster ID and click the log group name to view the log streams. For details, see LTS User Guide.
Figure 4 Viewing control plane audit logs on the TLS console
Disabling Control Plane Audit Logging
- Log in to the CCE console and click the cluster name to access the cluster console. In the navigation pane, choose Logging.
- Click the Control Plane Audit Logs tab. In the upper right corner, click Configure Control Plane Audit Logs. Then, determine whether to enable control plane audit logging.
Figure 5 Disabling control plane audit logging
- Deselect audit and click OK.
After you disable control plane audit logging, logs are no longer written to the original log stream, but the existing logs will not be deleted and expenses may be incurred for this.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot