Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam CKS Topic 1 Question 39 Discussion

Actual exam question for Linux Foundation's CKS exam
Question #: 39
Topic #: 1
[All CKS Questions]

You can switch the cluster/configuration context using the following command: [desk@cli] $kubectl config use-context test-account Task: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 for5days

3. at maximum, a number of10old audit log files are retained

A basic policy is provided at/etc/Kubernetes/logpolicy/audit-policy.yaml. It only specifies what not to log. Note: The base policy is located on the cluster's master node.

Edit and extend the basic policy to log: 1.Nodeschanges atRequestResponselevel 2. The request body ofpersistentvolumeschanges in the namespacefrontend 3.ConfigMapandSecretchanges in all namespaces at theMetadatalevel

Also, add a catch-all rule to log all other requests at theMetadatalevel Note:Don't forget to apply the modified policy.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Adolph
2 months ago
The step-by-step instructions are easy to follow. I'm confident I can implement the required audit logging setup based on this question.
upvoted 0 times
Fredric
2 days ago
After that, I will update the kube-apiserver.yaml file with the necessary configurations.
upvoted 0 times
...
Annmarie
4 days ago
I think I will start by editing the audit policy file as mentioned.
upvoted 0 times
...
Enola
9 days ago
I agree, the instructions are clear and detailed.
upvoted 0 times
...
...
Corinne
2 months ago
The explanation for the kube-apiserver YAML file modifications is clear. I'm glad they included the reference to the official Kubernetes documentation for further information.
upvoted 0 times
Sina
12 days ago
User1: Agreed, having that reference is helpful for further information.
upvoted 0 times
...
Amie
17 days ago
User2: Yes, it's good they included the reference to the official Kubernetes documentation for more details.
upvoted 0 times
...
Timothy
20 days ago
User1: The explanation for the kube-apiserver YAML file modifications is clear.
upvoted 0 times
...
...
Pok
2 months ago
Looks like a comprehensive set of steps to enable audit logging in the Kubernetes cluster. The policy file configuration seems well-structured and covers the key requirements.
upvoted 0 times
Brandee
6 days ago
Don't forget to apply the modified policy after making changes.
upvoted 0 times
...
Rolland
7 days ago
I like that it includes specific rules for different types of changes and requests.
upvoted 0 times
...
Jess
10 days ago
Yes, it provides clear instructions on how to configure the audit policy file.
upvoted 0 times
...
Melissa
11 days ago
This guide is really helpful for setting up audit logs in Kubernetes.
upvoted 0 times
...
Eileen
13 days ago
Don't forget to apply the modified policy after making changes.
upvoted 0 times
...
Graham
17 days ago
I like that it includes specific rules for different types of changes and requests.
upvoted 0 times
...
Brock
21 days ago
Yes, it provides clear instructions on how to configure the audit policy file.
upvoted 0 times
...
Olen
24 days ago
This guide is really helpful for setting up audit logs in Kubernetes.
upvoted 0 times
...
...
Elouise
3 months ago
The provided explanation on how to edit the policy and apply it is very helpful.
upvoted 0 times
...
Kate
3 months ago
I think editing and extending the basic policy is crucial for proper logging.
upvoted 0 times
...
Elouise
3 months ago
I feel confident about enabling audit logs in the cluster.
upvoted 0 times
...

Save Cancel