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 39 Discussion

Posted by Maryann on Jul 27, 2023 at 02:46 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
35 comments · newest first
CA
Casie 11 months ago
Good to see the audit logs being prioritized, finally!
CA
Catalina 12 months ago
Wait, are we really logging the request body for persistent volumes? Seems excessive.
LO
Lovetta 12 months ago
I think the catch-all rule is a smart move!
YU
Yuriko 1 year ago
Sounds straightforward, but why do we need to retain logs for only 5 days?
VE
Verdell 1 year ago
Just a reminder, don't forget to apply the modified policy!
KI
Kina 1 year ago
I’m a bit confused about the catch-all rule. Do we just add it at the end of the rules section in the policy file?
RO
Robt 1 year ago
I feel like we had a similar question in our last mock exam, but I can't recall if we had to specify the log retention settings like max age and backup.
AL
Alberta 1 year ago
I think the command to edit the audit policy was `vim /etc/kubernetes/log-policy/audit-policy.yaml`, right? I hope I got that part down.
SH
Shay 1 year ago
I remember we practiced enabling audit logs, but I’m not entirely sure about the exact syntax for the policy file.
AL
Alecia 1 year ago
Okay, let me think this through. We're creating a new Delta Live Tables pipeline, so we'll need to provide some basic information like the cloud storage location and the target database. I'm leaning towards C or D as the answer.
SA
Samira 1 year ago
I think the sales volume contribution variance reflects changes in sales and fixed costs, but I'm unsure how to apply it here.
IV
Ivan 1 year ago
Okay, let's see. I think the key is understanding how the loopback feature applies Group Policy differently. I'll need to review my notes on that.
QU
Quiana 1 year ago
This question seems straightforward - I think the answer is C, where users had trouble spelling the station name and the search wasn't error-tolerant. That would definitely impact satisfaction.
LA
Lashandra 1 year ago
Okay, I've got this. The key is the upsert option. If you set upsert to true, then the update command will create a new document if no matching document is found. I'm pretty confident that D is the correct answer.
IZ
Izetta 1 year ago
Hmm, this looks like a tricky one. I'll need to carefully analyze the network topology and interface information to determine the alternate path.
AD
Adolph 1 year 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.
FR
Fredric 1 year ago
↳ replying to Adolph
After that, I will update the kube-apiserver.yaml file with the necessary configurations.
AN
Annmarie 1 year ago
↳ replying to Adolph
I think I will start by editing the audit policy file as mentioned.
EN
Enola 1 year ago
↳ replying to Adolph
I agree, the instructions are clear and detailed.
CO
Corinne 1 year 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.
SI
Sina 1 year ago
↳ replying to Corinne
User1: Agreed, having that reference is helpful for further information.
AM
Amie 1 year ago
↳ replying to Corinne
User2: Yes, it's good they included the reference to the official Kubernetes documentation for more details.
TI
Timothy 1 year ago
↳ replying to Corinne
User1: The explanation for the kube-apiserver YAML file modifications is clear.
PO
Pok 2 years 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.
BR
Brandee 1 year ago
↳ replying to Pok
Don't forget to apply the modified policy after making changes.
RO
Rolland 1 year ago
↳ replying to Pok
I like that it includes specific rules for different types of changes and requests.
JE
Jess 1 year ago
↳ replying to Pok
Yes, it provides clear instructions on how to configure the audit policy file.
ME
Melissa 1 year ago
↳ replying to Pok
This guide is really helpful for setting up audit logs in Kubernetes.
EI
Eileen 1 year ago
↳ replying to Pok
Don't forget to apply the modified policy after making changes.
GR
Graham 1 year ago
↳ replying to Pok
I like that it includes specific rules for different types of changes and requests.
BR
Brock 1 year ago
↳ replying to Pok
Yes, it provides clear instructions on how to configure the audit policy file.
OL
Olen 1 year ago
↳ replying to Pok
This guide is really helpful for setting up audit logs in Kubernetes.
EL
Elouise 2 years ago
The provided explanation on how to edit the policy and apply it is very helpful.
KA
Kate 2 years ago
I think editing and extending the basic policy is crucial for proper logging.
EL
Elouise 2 years ago
I feel confident about enabling audit logs in the cluster.
0/2000 characters

Save Cancel