U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation CKS Exam - Topic 6 Question 84 Discussion

Fix all issues via configuration and restart the affected components to ensure the new setting takes effect.Fix all of the following violations that were found against theAPI server:-a. Ensure the --authorization-mode argument includes RBACb. Ensure the --authorization-mode argument includes Nodec. Ensure that the --profiling argument is set to falseFix all of the following violations that were found against theKubelet:-a. Ensure the --anonymous-auth argument is set to false.b. Ensure that the --authorization-mode argument is set to Webhook.Fix all of the following violations that were found against theETCD:-a. Ensure that the --auto-tls argument is not set to trueHint: Take the use of Tool Kube-Bench
A) Explanation: API server: Ensure the --authorization-mode argument includes RBAC Turn on Role Based Access Control. Role Based Access Control (RBAC) allows fine-grained control over the operations that different entities can perform on different objects in the cluster. It is recommended to use the RBAC authorization mode. Fix - Buildtime Kubernetes apiVersion: v1 kind: Pod metadata: creationTimestamp: null labels: component: kube-apiserver tier: control-plane name: kube-apiserver namespace: kube-system spec: containers: - command: + - kube-apiserver + - --authorization-mode=RBAC,Node image: gcr.io/google_containers/kube-apiserver-amd64:v1.6.0 livenessProbe: failureThreshold: 8 httpGet: host: 127.0.0.1 path: /healthz port: 6443 scheme: HTTPS initialDelaySeconds: 15 timeoutSeconds: 15 name: kube-apiserver-should-pass resources: requests: cpu: 250m volumeMounts: - mountPath: /etc/kubernetes/ name: k8s readOnly: true - mountPath: /etc/ssl/certs name: certs - mountPath: /etc/pki name: pki hostNetwork: true volumes: - hostPath: path: /etc/kubernetes name: k8s - hostPath: path: /etc/ssl/certs name: certs - hostPath: path: /etc/pki name: pki Ensure the --authorization-mode argument includes Node Remediation:Edit the API server pod specification file/etc/kubernetes/manifests/kube-apiserver.yamlon the master node and set the--authorization-modeparameter to a value that includesNode. --authorization-mode=Node,RBAC Audit: /bin/ps -ef | grep kube-apiserver | grep -v grep Expected result: 'Node,RBAC' has 'Node' Ensure that the --profiling argument is set to false Remediation:Edit the API server pod specification file/etc/kubernetes/manifests/kube-apiserver.yamlon the master node and set the below parameter. --profiling=false Audit: /bin/ps -ef | grep kube-apiserver | grep -v grep Expected result: 'false' is equal to 'false' Fix all of the following violations that were found against theKubelet:- Ensure the --anonymous-auth argument is set to false. Remediation:If using a Kubelet config file, edit the file to set authentication:anonymous: enabled tofalse. If using executable arguments, edit the kubelet service file/etc/systemd/system/kubelet.service.d/10-kubeadm.confon each worker node and set the below parameter inKUBELET_SYSTEM_PODS_ARGSvariable. --anonymous-auth=false Based on your system, restart the kubelet service. For example: systemctl daemon-reload systemctl restart kubelet.service Audit: /bin/ps -fC kubelet Audit Config: /bin/cat /var/lib/kubelet/config.yaml Expected result: 'false' is equal to 'false' 2) Ensure that the --authorization-mode argument is set to Webhook. Audit docker inspect kubelet | jq -e '.[0].Args[] | match('--authorization-mode=Webhook').string' Returned Value:--authorization-mode=Webhook Fix all of the following violations that were found against theETCD:- a. Ensure that the --auto-tls argument is not set to true Do not use self-signed certificates for TLS. etcd is a highly-available key value store used by Kubernetes deployments for persistent storage of all of its REST API objects. These objects are sensitive in nature and should not be available to unauthenticated clients. You should enable the client authentication via valid certificates to secure the access to the etcd service. Fix - Buildtime Kubernetes apiVersion: v1 kind: Pod metadata: annotations: scheduler.alpha.kubernetes.io/critical-pod: '' creationTimestamp: null labels: component: etcd tier: control-plane name: etcd namespace: kube-system spec: containers: - command: + - etcd + - --auto-tls=true image: k8s.gcr.io/etcd-amd64:3.2.18 imagePullPolicy: IfNotPresent livenessProbe: exec: command: - /bin/sh - -ec - ETCDCTL_API=3 etcdctl --endpoints=https://[192.168.22.9]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt --key=/etc/kubernetes/pki/etcd/healthcheck-client.key get foo failureThreshold: 8 initialDelaySeconds: 15 timeoutSeconds: 15 name: etcd-should-fail resources: {} volumeMounts: - mountPath: /var/lib/etcd name: etcd-data - mountPath: /etc/kubernetes/pki/etcd name: etcd-certs hostNetwork: true priorityClassName: system-cluster-critical volumes: - hostPath: path: /var/lib/etcd type: DirectoryOrCreate name: etcd-data - hostPath: path: /etc/kubernetes/pki/etcd type: DirectoryOrCreate name: etcd-certs status: {}

Linux Foundation CKS Exam - Topic 6 Question 84 Discussion

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

Fix all issues via configuration and restart the affected components to ensure the new setting takes effect.

Fix all of the following violations that were found against theAPI server:-

a. Ensure the --authorization-mode argument includes RBAC

b. Ensure the --authorization-mode argument includes Node

c. Ensure that the --profiling argument is set to false

Fix all of the following violations that were found against theKubelet:-

a. Ensure the --anonymous-auth argument is set to false.

b. Ensure that the --authorization-mode argument is set to Webhook.

Fix all of the following violations that were found against theETCD:-

a. Ensure that the --auto-tls argument is not set to true

Hint: Take the use of Tool Kube-Bench

Show Suggested Answer Hide Answer
Suggested Answer: A


Contribute your Thoughts:

0/2000 characters
Casey
2 months ago
Agreed, without proper authorization, it’s risky!
upvoted 0 times
...
Wilda
3 months ago
I think ensuring RBAC is crucial for security.
upvoted 0 times
...
Dannette
3 months ago
The hint about Kube-Bench is helpful though.
upvoted 0 times
...
Mila
3 months ago
I feel overwhelmed by the configurations.
upvoted 0 times
...
Fernanda
3 months ago
I know, so many details to fix.
upvoted 0 times
...
Launa
3 months ago
This question is intense!
upvoted 0 times
...
Crista
4 months ago
Just fixed my kube-apiserver with those settings, works great!
upvoted 0 times
...
Hillary
4 months ago
I thought auto-tls was the best practice for etcd?
upvoted 0 times
...
Carlene
4 months ago
Wait, are we really disabling anonymous auth? Seems risky.
upvoted 0 times
...
Deangelo
4 months ago
The hint about using Kube-Bench is a nice touch. That tool can really help identify and fix these kinds of configuration issues.
upvoted 0 times
...
Tracey
5 months ago
Haha, "Kubernetes knobs" - that's a good one! This question is definitely testing our Kubernetes admin skills.
upvoted 0 times
...
Lottie
5 months ago
Looks like we need to ensure the right authorization modes are set for the API server, Kubelet, and etcd. Gotta love all these Kubernetes knobs!
upvoted 0 times
...
Holley
5 months ago
This question covers a lot of important Kubernetes configuration settings. I'll need to review the details carefully.
upvoted 0 times
...
Mitzie
5 months ago
I recall that the --auto-tls argument for ETCD should not be true, but I’m not clear on how to verify that after making the change.
upvoted 0 times
...
Salina
5 months ago
The hint about using Kube-Bench is helpful, but I’m a bit confused about how to apply it to check the ETCD settings.
upvoted 0 times
...
Olga
5 months ago
I think the Kubelet's --anonymous-auth setting was something we covered in a similar question. It definitely needs to be set to false for security reasons.
upvoted 0 times
...
Phil
6 months ago
I remember we practiced the RBAC configuration for the API server, but I'm not entirely sure about the exact syntax for the command line arguments.
upvoted 0 times
...
Queen
6 months ago
Whoa, this is a lot of stuff to fix. I'm a little overwhelmed, to be honest. I better take my time and really focus on understanding each violation and how to properly address it. Can't afford to mess this up.
upvoted 0 times
...
Shenika
6 months ago
Totally agree, can't skip on that.
upvoted 0 times
...
Lisbeth
6 months ago
Okay, I see the key things I need to focus on here - making sure the authorization modes are set correctly, disabling profiling, and handling the auto-TLS issue for etcd. I think I can knock this out, just need to be methodical in my approach.
upvoted 0 times
...
Novella
6 months ago
RBAC is a must for security!
upvoted 0 times
...
Robt
7 months ago
I'm feeling pretty confident about this. The instructions are clear, and I've worked with Kubernetes configuration before. I'll just need to double-check my work to make sure I haven't missed anything.
upvoted 0 times
...
Vernice
7 months ago
Hmm, this is a lot of information to take in. I'm a bit confused about some of the specific configuration changes I need to make. I'll have to read through it carefully and make sure I understand exactly what needs to be done.
upvoted 0 times
...
Buffy
7 months ago
This looks like a pretty straightforward exam question. I think I can handle this - I just need to carefully go through each violation and fix it according to the instructions.
upvoted 0 times
Denny
2 months ago
And verify the etcd settings too!
upvoted 0 times
...
Reyes
2 months ago
Make sure to restart the components after changes.
upvoted 0 times
...
Trevor
2 months ago
Don't forget to check the RBAC settings!
upvoted 0 times
...
Maryanne
2 months ago
I agree, it seems manageable.
upvoted 0 times
...
Shawn
7 months ago
Just take it step by step.
upvoted 0 times
...
...

Save Cancel