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 CKS Exam - Topic 1 Question 28 Discussion

Posted by Weldon on Jul 30, 2022 at 07:52 AM

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.

Suggested Answer: A

Get Premium CKS Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
11 comments · newest first
AM
Ammie 12 months ago
Is it really necessary to log the request body for persistent volumes?
NO
Noel 1 year ago
I disagree, 10 old log files is way too few for audit purposes.
CH
Charisse 1 year ago
The command to switch context is super handy!
JA
James 1 year ago
Wait, are we really keeping logs for 5 days? Seems a bit short.
MI
Mitsue 1 year ago
Don't forget to apply the modified policy after editing!
LE
Leslee 1 year ago
I feel a bit confused about where to place the audit policy file path in the kube-apiserver configuration. Was it in the command section or somewhere else?
SH
Sheridan 1 year ago
I think we had a similar question in our last mock exam about logging changes to resources. I hope I can recall the right levels for each resource.
SY
Sylvie 1 year ago
I remember we practiced enabling audit logs, but I'm not entirely sure about the exact syntax for the audit policy rules.
LA
Lavonna 1 year ago
I definitely remember that we need to ensure the logs are stored in the correct path, but I can't quite recall the retention settings. Was it 5 days and 10 backups?
LA
Lakeesha 1 year ago
I'm a bit confused by the multi-tenant database container (MDO) mode. I'll need to make sure I understand how that affects the backup process before I can confidently select an answer.
JI
Jillian 1 year ago
Hmm, I'm a bit confused. Do I need to create a dynamic distribution list or a regular one? And do I share the dashboard from the Power BI service or from Desktop?
0/2000 characters

Save Cancel