nerdexam
Linux_Foundation

CKS · Question #30

Enable audit logs in the cluster. To do so, enable the log backend, and ensure that: 1. logs are stored at /var/log/Kubernetes/logs.txt 2. log files are retained for 5 days 3. at maximum, a number of

Sign in or unlock CKS to reveal the answer and full explanation for question #30. The question stem and answer options stay visible for context.

Submitted by kevin_r· May 5, 2026Monitoring, Logging, and Runtime Security

Question

Enable audit logs in the cluster. To do so, enable the log backend, and ensure that:
  1. logs are stored at /var/log/Kubernetes/logs.txt
  2. log files are retained for 5 days
  3. at maximum, a number of 10 old audit log files are retained
Edit and extend the basic policy provided at /etc/Kubernetes/logpolicy/audit-policy.yaml to log:
  1. Nodes changes at RequestResponse level
  2. The request body of persistentvolumes changes in the namespace frontend
  3. ConfigMap and Secret changes in all namespaces at the Metadata level
Also, add a catch-all rule to log all other requests at the Metadata level. Don't forget to apply the modified policy.

Unlock CKS to see the answer

You've previewed enough free CKS questions. Unlock CKS for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Kubernetes Audit Logging#API Server Configuration#Audit Policy#Security Logging
Full CKS Practice