Docsity

LFS260 Kubernetes Security Essentials Practice Exam, Exams of Cybersecurity

Toggle sidebar
bg1
LFS260 Kubernetes Security Essentials
Practice Exam
Question 1. **What is the primary goal of the Kubernetes Security Essentials course?**
A) To teach application development in Kubernetes
B) To prepare students for the CKA exam only
C) To provide hands‑on practice for securing a Kubernetes cluster from installation to runtime
D) To explain container orchestration concepts without security focus
Answer: C
Explanation: The course is designed to give practical experience securing Kubernetes across its
lifecycle, not just exam preparation or development basics.
---
Question 2. **Which prerequisite is most strongly recommended before taking the Kubernetes
Security Essentials course?**
A) Prior experience with Docker Swarm
B) A current CKA certification or strong Linux command‑line skills
C) Knowledge of Windows Server administration
D) Familiarity with serverless functions
Answer: B
Explanation: The course assumes a solid foundation in Linux and Kubernetes administration,
often demonstrated by a CKA certification.
---
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download LFS260 Kubernetes Security Essentials Practice Exam and more Exams Cybersecurity in PDF only on Docsity!

Practice Exam

Question 1. What is the primary goal of the Kubernetes Security Essentials course? A) To teach application development in Kubernetes B) To prepare students for the CKA exam only C) To provide hands‑on practice for securing a Kubernetes cluster from installation to runtime D) To explain container orchestration concepts without security focus Answer: C Explanation: The course is designed to give practical experience securing Kubernetes across its lifecycle, not just exam preparation or development basics.


Question 2. Which prerequisite is most strongly recommended before taking the Kubernetes Security Essentials course? A) Prior experience with Docker Swarm B) A current CKA certification or strong Linux command‑line skills C) Knowledge of Windows Server administration D) Familiarity with serverless functions Answer: B Explanation: The course assumes a solid foundation in Linux and Kubernetes administration, often demonstrated by a CKA certification.


Practice Exam

Question 3. In the Shared Responsibility Model for cloud‑native environments, which of the following is the customer's responsibility? A) Physical security of the data‑center hardware B) Patching the underlying hypervisor C) Configuring network security policies inside the Kubernetes cluster D) Managing the cloud provider’s API gateway Answer: C Explanation: Customers must secure the workloads they run, including network policies, while the provider handles the physical infrastructure and hypervisor.


Question 4. Which threat is most directly associated with the container supply chain? A) DDoS attacks against the API server B) Injection of malicious code into container images during build C) Unauthorized SSH access to worker nodes D) Misconfiguration of ServiceAccounts Answer: B Explanation: Supply‑chain attacks target the image build process, inserting malicious code before deployment.


Question 5. Before installing a Kubernetes cluster, why is OS hardening important?

Practice Exam

A) Checking the file size against documentation B) Comparing SHA‑256 checksums with the vendor’s published values and using GPG signatures C) Running the binary in a sandbox for a few minutes D) Confirming the binary’s timestamp is recent Answer: B Explanation: Checksums and GPG signatures ensure the binary has not been tampered with and originates from a trusted source.


Question 8. Which component stores the Kubernetes cluster state and must be protected with encryption at rest? A) kube‑proxy B) etcd C) CoreDNS D) kube‑scheduler Answer: B Explanation: etcd holds all cluster configuration and secrets; encrypting its data prevents disclosure if the storage is compromised.


Question 9. According to the CIS Kubernetes Benchmark, which flag should be set on the kube‑apiserver to limit request bodies?

Practice Exam

A) --max‑request‑body‑size= B) --request‑timeout=30s C) --audit‑log‑path=/var/log/kube‑audit.log D) --authorization‑mode=Node,RBAC Answer: A Explanation: Limiting request body size mitigates denial‑of‑service attacks that send excessively large payloads.


Question 10. What is the effect of enabling the AdmissionControl webhook PodSecurity in Kubernetes 1.25+? A) It automatically encrypts all pod traffic with mTLS B) It enforces Pod Security Standards (baseline, restricted, privileged) at creation time C) It disables all privileged containers globally D) It replaces RBAC with attribute‑based access control Answer: B Explanation: The PodSecurity admission controller validates pods against defined security standards, rejecting non‑compliant specifications.


Question 11. Which RBAC object grants permissions to a specific namespace only? A) ClusterRole

Practice Exam

B) They grant pods a token that can be used to access the API server with default permissions, increasing the attack surface C) They prevent pods from using host networking D) They block all outbound traffic from pods Answer: B Explanation: Default ServiceAccounts provide a token with broad access; limiting or disabling them reduces potential misuse.


Question 14. Which NetworkPolicy rule would deny all inbound traffic to a pod except from pods in the same namespace with label app=frontend? A) deny all; allow from app=frontend in any namespace B) allow all; deny from app=frontend C) ingress with from selector namespaceSelector: {} and podSelector: {app: frontend} and no other rules D) No NetworkPolicy needed – default deny is enforced Answer: C Explanation: An ingress rule that only selects pods with app=frontend in the same namespace permits those connections while all others are denied.


Question 15. When configuring an Ingress controller with TLS, which Kubernetes resource stores the TLS certificate and private key?

Practice Exam

A) ConfigMap B) Secret of type tls C) Service D) PersistentVolumeClaim Answer: B Explanation: TLS secrets of type kubernetes.io/tls hold the certificate and key for Ingress resources.


Question 16. What does the CNI plugin Cilium primarily provide beyond basic networking? A) Container image scanning B) eBPF‑based network security policies and transparent encryption between pods C) Automatic node scaling D) Built‑in secret management Answer: B Explanation: Cilium leverages eBPF to enforce fine‑grained network policies and can encrypt pod‑to‑pod traffic.


Question 17. Which of the following is a recommended practice for securing pod‑to‑pod communication without a service mesh? A) Enabling hostNetwork: true for all pods

Practice Exam

C) To encrypt environment variables at rest D) To enable automatic scaling of pods Answer: B Explanation: Seccomp filters system calls, preventing containers from executing potentially dangerous operations.


Question 20. Which Kubernetes object should be used to store sensitive configuration data such as database passwords? A) ConfigMap B) Secret C) PersistentVolume D) Service Answer: B Explanation: Secret objects are base64‑encoded and can be configured to be encrypted at rest, making them suitable for sensitive data.


Question 21. How does gVisor improve container isolation compared to the default Docker runtime? A) It runs containers in a separate virtual machine hypervisor

Practice Exam

B) It implements a user‑space kernel that intercepts syscalls, reducing the attack surface of the host kernel C) It disables all network interfaces for containers D) It automatically signs container images Answer: B Explanation: gVisor provides a user‑space kernel, limiting the host kernel exposure to container syscalls.


Question 22. Which step is essential when signing container images for supply‑chain security? A) Compressing the image with gzip B) Using Docker’s --squash flag C) Generating a cryptographic signature with a private key and publishing the public key to a trusted registry D) Tagging the image with latest Answer: C Explanation: Signing creates a verifiable cryptographic proof that the image has not been altered, and the public key must be available for verification.


Question 23. What does the tool kubesec primarily analyze?

Practice Exam

B) Falco C) kube‑proxy D) kubeadm Answer: B Explanation: Falco uses syscall monitoring to generate alerts for suspicious activities.


Question 26. What is the purpose of making containers immutable at runtime? A) To prevent the container from being restarted B) To ensure that no process can modify the container’s filesystem, reducing the risk of post‑deployment tampering C) To lock the container’s IP address D) To disable all network traffic from the container Answer: B Explanation: Immutable containers cannot be altered after launch, limiting the attacker’s ability to inject malicious code.


Question 27. Which phase of the MITRE ATT&CK kill chain corresponds to the activity of pulling a malicious image from an insecure registry? A) Reconnaissance B) Delivery

Practice Exam

C) Exploitation D) Command & Control Answer: B Explanation: The act of obtaining a malicious artifact is part of the Delivery phase.


Question 28. Which Kubernetes feature can be used to enforce that all pods run with a non‑root user by default? A) PodSecurityPolicy (deprecated) B) PodSecurity Standards with enforce: restricted C) ServiceAccount token automount D) HorizontalPodAutoscaler Answer: B Explanation: The restricted level of PodSecurity Standards disallows running containers as root unless explicitly permitted.


Question 29. When configuring firewall rules for a Kubernetes control plane, which ports must remain open for node‑to‑control‑plane communication? A) 80/TCP and 443/TCP B) 10250/TCP (kubelet), 6443/TCP (API server), 2379‑2380/TCP (etcd) C) 22/TCP and 3306/TCP

Practice Exam

C) Using the default default ServiceAccount for all pods D) Disabling ServiceAccount tokens entirely Answer: B Explanation: Assigning minimal, workload‑specific permissions follows the principle of least privilege.


Question 32. In the context of Kubernetes, what does “image provenance” refer to? A) The geographic location of the image registry B) The documented history and verification of an image’s origin, including signatures and build metadata C) The size of the container image in megabytes D) The number of layers in the Dockerfile Answer: B Explanation: Provenance provides evidence of where an image came from and that it has not been tampered with.


Question 33. Which Kubernetes component validates admission webhook responses before allowing an object to be persisted? A) kube‑controller‑manager B) kube‑scheduler

Practice Exam

C) kube‑apiserver D) kube‑proxy Answer: C Explanation: Admission webhooks are called by the API server during request processing.


Question 34. What is the effect of setting readOnlyRootFilesystem: true in a pod’s security context? A) It disables all network access for the container B) It forces the container’s root filesystem to be mounted read‑only, preventing writes to system directories C) It allows the container to run as root without restrictions D) It encrypts the container’s filesystem Answer: B Explanation: This setting protects the base image from being altered at runtime.


Question 35. Which of the following is a security benefit of using a dedicated image registry with vulnerability scanning enabled? A) Faster image pull times for all nodes B) Automatic deletion of old images after 30 days C) Early detection of known CVEs before images are deployed to the cluster

Practice Exam

Answer: B Explanation: kubectl get networkpolicy returns the defined policies.


Question 38. What is the primary security advantage of using a service mesh like Istio for pod‑to‑pod encryption? A) It replaces the need for TLS certificates entirely B) It provides automatic mutual TLS (mTLS) between services without modifying application code C) It disables all inbound traffic to the mesh D) It stores all secrets in plain text for faster access Answer: B Explanation: Istio can inject sidecars that handle mTLS, securing inter‑service traffic transparently.


Question 39. Which type of Admission Controller can mutate incoming pod specifications to add a default security context? A) ValidatingAdmissionWebhook B) MutatingAdmissionWebhook C) ResourceQuota D) NamespaceLifecycle

Practice Exam

Answer: B Explanation: Mutating webhooks can modify objects before they are persisted, such as adding security settings.


Question 40. In a Kubernetes audit policy, which stage value captures events after a request has been processed? A) RequestReceived B) ResponseStarted C) ResponseComplete D) Panic Answer: C Explanation: ResponseComplete logs the final outcome of a request.


Question 41. Which of the following is NOT a recommended practice for managing Kubernetes secrets? A) Enabling secret encryption at rest B) Storing secrets in plain‑text ConfigMaps C) Using external secret management solutions (e.g., Vault) D) Rotating secrets regularly