Labour Day Special 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exams65

Certified Kubernetes Security Specialist (CKS) Question and Answers

Certified Kubernetes Security Specialist (CKS)

Last Update Apr 28, 2024
Total Questions : 48

We are offering FREE CKS Linux Foundation exam questions. All you do is to just go and sign up. Give your details, prepare CKS free exam questions and then go for complete pool of Certified Kubernetes Security Specialist (CKS) test questions that will help you more.

CKS pdf

CKS PDF

$35  $99.99
CKS Engine

CKS Testing Engine

$42  $119.99
CKS PDF + Engine

CKS PDF + Testing Engine

$56  $159.99
Questions 1

Context:

Cluster: prod

Master node: master1

Worker node: worker1

You can switch the cluster/configuration context using the following command:

[desk@cli] $ kubectl config use-context prod

Task:

Analyse and edit the given Dockerfile (based on the ubuntu:18:04 image)

/home/cert_masters/Dockerfile fixing two instructions present in the file being prominent security/best-practice issues. 

Analyse and edit the given manifest file

/home/cert_masters/mydeployment.yaml fixing two fields present in the file being prominent security/best-practice issues.

Note: Don't add or remove configuration settings; only modify the existing configuration settings, so that two configuration settings each are no longer security/best-practice concerns.

Should you need an unprivileged user for any of the tasks, use user nobody with user id 65535

Options:

Discussion 0
Questions 2

You must complete this task on the following cluster/nodes: Cluster: immutable-cluster

Master node: master1

Worker node: worker1

You can switch the cluster/configuration context using the following command:

[desk@cli] $  kubectl config use-context immutable-cluster 

Context: It is best practice to design containers to be stateless and immutable.

Task:

Inspect Pods running in namespace prod and delete any Pod that is either not stateless or not immutable.

Use the following strict interpretation of stateless and immutable:

1. Pods being able to store data inside containers must be treated as not stateless. 

Note: You don't have to worry whether data is actually stored inside containers or not already.

2. Pods being configured to be privileged in any way must be treated as potentially not stateless or not immutable.

Options:

Discussion 0
Questions 3

Enable audit logs in the cluster, To Do so, enable the log backend, and ensure that

  • 1. logs are stored at /var/log/kubernetes/kubernetes-logs.txt.
  • 2. Log files are retained for 5 days.
  • 3. at maximum, a number of 10 old audit logs files are retained.

Edit and extend the basic policy to log:

  • 1. Cronjobs changes at RequestResponse
  • 2. Log the request body of deployments changes in the namespace kube-system.
  • 3. Log all other resources in core and extensions at the Request level.
  • 4. Don't log watch requests by the "system:kube-proxy" on endpoints or

Options:

Discussion 0
Questions 4

Task

Create a NetworkPolicy named pod-access to restrict access to Pod users-service running in namespace dev-team.

Only allow the following Pods to connect to Pod users-service:

Pods in the namespace qa

Pods with label environment: testing, in any namespace

Options:

Discussion 0
Questions 5

Context

The kubeadm-created cluster's Kubernetes API server was, for testing purposes, temporarily configured to allow unauthenticated and unauthorized access granting the anonymous user duster-admin access.

Task

Reconfigure the cluster's Kubernetes API server to ensure that only authenticated and authorized REST requests are allowed.

Use authorization mode Node,RBAC and admission controller NodeRestriction.

Cleaning up, remove the ClusterRoleBinding for user system:anonymous.

Options:

Discussion 0
Questions 6

Context

AppArmor is enabled on the cluster's worker node. An AppArmor profile is prepared, but not enforced yet.

Task

On the cluster's worker node, enforce the prepared AppArmor profile located at /etc/apparmor.d/nginx_apparmor.

Edit the prepared manifest file located at /home/candidate/KSSH00401/nginx-pod.yaml to apply the AppArmor profile.

Finally, apply the manifest file and create the Pod specified in it.

Options:

Discussion 0
Questions 7

Create a new NetworkPolicy named deny-all in the namespace testing which denies all traffic of type ingress and egress traffic

Options:

Discussion 0