Courseiva

Kubernetes and Cloud Native Security Associate (KCSA, CNCF) (KCSA) (KCSA) — Questions 151225

320 questions total · 5pages · All types, answers revealed

Page 2

Page 3 of 5

Page 4
151
Multi-Selecteasy

Which TWO actions are core tenets of the "Shift-Left" security philosophy in cloud-native compliance? (Choose TWO)

Select 2 answers
A.Disabling all automated security tooling to speed up commits
B.Scanning infrastructure-as-code (IaC) templates for misconfigurations before deployment
C.Waiting until a production breach occurs to audit logs
D.Integrating vulnerability scanning directly into the CI/CD pipeline
E.Relying entirely on manual code reviews post-release
AnswersB, D

Catching misconfigurations in code before applying to production is shifting left.

Why this answer

Shift-left security focuses on integrating security checks early in the development lifecycle, such as in CI/CD and IaC scanning.

152
MCQhard

An enterprise is deploying a zero-trust architecture across their Kubernetes environments. They mandate that all container images must be signed using Cosign and verified at admission time using Kyverno. This technical control directly hardens which of the 4Cs layers?

A.Code layer
B.Cloud layer
C.Container layer
D.Cluster layer
AnswerC

Image signatures and registry verification protect the integrity of the Container layer.

Why this answer

Container image signing and admission verification ensure the integrity of container images before they run, addressing the Container layer.

153
Multi-Selectmedium

Which THREE of the following are characteristics of Zero Trust security models in cloud-native environments? (Choose THREE)

Select 3 answers
A.Relying entirely on network firewalls at the cloud perimeter
B.Explicitly verifying identity and context for every access request
C.Assuming breach and implementing micro-segmentation
D.Applying the principle of least privilege access
E.Implicit trust for all traffic originating inside the internal corporate network
AnswersB, C, D

Every request must be authenticated and authorized.

Why this answer

Zero Trust relies on explicit verification, least privilege, and assuming breach rather than trusting internal networks implicitly.

154
Multi-Selecthard

Which TWO components are involved in configuring and processing admission webhooks in a Kubernetes cluster?

Select 2 answers
A.kube-apiserver
B.ValidatingWebhookConfiguration
C.kube-proxy
D.kubelet
E.etcd daemon
AnswersA, B

The API server invokes admission webhooks during request processing.

Why this answer

Admission webhooks are configured via MutatingWebhookConfiguration or ValidatingWebhookConfiguration objects, and processed by the kube-apiserver.

155
Multi-Selecthard

An administrator is hardening a Kubernetes cluster against container breakout vulnerabilities and node compromise. Which THREE security practices should be implemented?

Select 3 answers
A.Run all containers as the root user (UID 0) to ensure smooth file permission handling.
B.Configure readOnlyRootFilesystem: true to prevent malicious writes to the container's root file system.
C.Drop all default Linux capabilities (ALL) and explicitly add back only those strictly required by the application.
D.Enable hostNetwork and hostPID on all production pods to improve debugging visibility.
E.Enforce the Pod Security Standards "restricted" profile via namespace labeling.
AnswersB, C, E

A read-only root filesystem prevents attackers from dropping binaries or modifying system files inside the container.

Why this answer

Hardening involves dropping unnecessary Linux capabilities, enforcing read-only root filesystems where applicable, and avoiding sharing host namespaces like hostNetwork or hostPID.

156
MCQeasy

Which file on a Kubernetes control plane node contains the startup arguments and flags for the statically hosted API server?

A./etc/systemd/system/kube-apiserver.service
B./etc/kubernetes/manifests/kube-apiserver.yaml
C./etc/default/kube-apiserver
D./var/lib/kubelet/config.yaml
AnswerB

The API server static pod manifest contains its container spec and command-line arguments.

Why this answer

Static pods for control plane components are defined in YAML files located in /etc/kubernetes/manifests.

157
MCQeasy

What is the primary risk associated with running containers as the `root` user (`runAsUser: 0` or omitting the user directive)?

A.If a container escape vulnerability occurs, the attacker immediately obtains root privileges on the underlying host.
B.It prevents the kubelet from restarting the container upon failure.
C.It disables the container runtime engine's ability to pull images from private registries.
D.It forces the CNI plugin to drop network packets destined for external IPs.
AnswerA

Container root maps directly to host root or powerful UID 0 capabilities in misconfigured or un-namespaced environments, easing host compromise.

Why this answer

Running as root inside the container means the process has root privileges inside the container namespace, and if a container escape vulnerability exists, the attacker immediately gains root access on the host.

158
MCQhard

An organization mandates that all traffic entering the service mesh must be decrypted at the ingress gateway, inspected by a Web Application Firewall (WAF), and then re-encrypted using mTLS before reaching backend pods. What is this architectural pattern called within service mesh security?

A.HTTP plaintext tunneling
B.Pod security standard restriction
C.DNS-based load balancing
D.TLS re-encryption (or edge termination with backend mTLS)
AnswerD

TLS re-encryption terminates incoming TLS at the gateway and establishes a fresh secure mTLS connection to the backend.

Why this answer

Re-encryption (or TLS origination/re-encryption) is the pattern where traffic is terminated at an edge proxy and then a new TLS connection is established to the internal backend service.

159
MCQmedium

An application pod requires read access to secrets in the 'production' namespace. You need to bind a pre-existing ClusterRole named 'secret-reader' to a service account named 'app-sa' in that namespace. Which RBAC resource accomplishes this?

A.ClusterRoleBinding referencing the Role 'secret-reader'
B.NamespaceRoleBinding referencing the ClusterRole
C.RoleBinding referencing the ClusterRole 'secret-reader'
D.ServiceAccountBinding referencing the ClusterRole
AnswerC

A RoleBinding in the target namespace can bind to a ClusterRole, granting access scoped to that namespace.

Why this answer

A RoleBinding can reference a ClusterRole to grant permissions defined in that ClusterRole to subjects within the specific namespace of the RoleBinding.

160
MCQhard

You are configuring a runtime security agent that uses Falco to detect unexpected shell execution inside containers. The security rule triggers when a process spawns a shell binary (e.g., bash or sh) inside a container namespace. Which underlying Linux kernel mechanism allows Falco to detect this event with minimal overhead?

A.Periodic polling of container logs using kubectl logs
B.eBPF system call tracing and kernel event capture
C.Analyzing CoreDNS lookup history
D.Inspecting etcd database keys every second
AnswerB

eBPF allows Falco to monitor system calls efficiently at the kernel level without performance penalties of context switching.

Why this answer

Falco uses kernel modules or eBPF probe drivers to capture system calls and event streams from the Linux kernel, matching them against a rules engine to detect anomalous behavior.

161
MCQmedium

A CI/CD pipeline service account needs permission to create Deployments and Services across multiple namespaces, but should not have cluster-admin privileges. What is the most secure way to grant these permissions?

A.Define a ClusterRole with the required verbs and resources, then create a RoleBinding for that ClusterRole in each target namespace.
B.Place the service account in the kube-system namespace.
C.Grant the service account permissions at the node level using kubeconfig overrides.
D.Create a ClusterRoleBinding linking the default cluster-admin ClusterRole to the service account.
AnswerA

This allows a single ClusterRole definition to be reused across multiple namespaces via namespaced RoleBindings, limiting scope.

Why this answer

Create a ClusterRole with the necessary rules for Deployments and Services, and bind it to the service account in each target namespace using RoleBindings.

162
Multi-Selecthard

Which THREE advanced container runtime or image security features help prevent container breakout exploits? (Choose three)

Select 3 answers
A.Using sandboxed container runtimes (such as Kata Containers or gVisor) for strong isolation
B.Running all containers in privileged mode
C.Mounting host /proc and /sys directories in read-write mode
D.Applying restrictive Seccomp profiles to block sensitive system calls
E.Dropping dangerous capabilities like CAP_SYS_ADMIN, CAP_NET_RAW, and CAP_SYS_PTRACE
AnswersA, D, E

Sandboxed runtimes provide a hardware virtualization or user-space kernel layer between containers and the host.

Why this answer

Container breakouts are mitigated by dropping unnecessary capabilities, enforcing seccomp profiles, and using secure container runtimes or sandboxed runtimes like gVisor.

163
MCQeasy

Which Kubernetes component manages the assignment of pending pods to healthy worker nodes based on resource availability and constraints?

A.kube-proxy
B.kube-scheduler
C.kube-apiserver
D.etcd
AnswerB

The scheduler matches pending pods to nodes.

Why this answer

The kube-scheduler evaluates scheduling requirements and binds pods to nodes.

164
MCQhard

You are troubleshooting a service mesh traffic split policy where telemetry shows that unauthorized external clients are bypassing the service mesh ingress gateway and directly accessing backend services via NodePort services. Which Kubernetes feature should you configure to prevent direct NodePort access to these sensitive pods?

A.Enabling anonymous authentication in kube-apiserver
B.Changing the service type from NodePort to ClusterIP
C.Increasing the API server request rate limit
D.NetworkPolicies restricting pod ingress traffic exclusively to the service mesh gateway pod selector
AnswerD

NetworkPolicies ensure that pods only accept traffic from authorized sources such as the ingress gateway.

Why this answer

Kubernetes NetworkPolicies can be configured to restrict incoming traffic to backend pods so that they only accept connections originating from the ingress gateway pod selectors, blocking direct NodePort access.

165
Multi-Selectmedium

A compliance team is adopting the NIST SP 800-190 standard to secure their container image pipeline. Which THREE practices are recommended in this framework for managing container images? (Choose THREE)

Select 3 answers
A.Employ trusted base images from verified publishers
B.Implement vulnerability scanning in the CI/CD pipeline and registry
C.Store plaintext passwords directly inside Dockerfile ENV directives
D.Rely exclusively on public unverified base images to speed up development
E.Use digitally signed images to verify provenance and integrity
AnswersA, B, E

Using hardened, verified base images reduces the attack surface.

Why this answer

NIST SP 800-190 recommends vulnerability scanning, cryptographic signing/provenance, and using trusted base images.

166
MCQhard

A security team implements mutual TLS (mTLS) between all microservices using Istio Service Mesh. Which principle of cloud native security does this implementation primarily exemplify?

A.Zero-trust network segmentation and encryption in transit
B.Perimeter-based network defense
C.Shared fate computing
D.Physical host isolation
AnswerA

mTLS establishes zero-trust by authenticating and encrypting service-to-service communication.

Why this answer

Encrypting data in transit between microservices implements zero-trust networking and defense-in-depth principles within the cluster.

167
MCQhard

You are troubleshooting a custom controller that fails to read ConfigMaps in the 'kube-system' namespace despite having a ClusterRole bound via a ClusterRoleBinding. What is the most likely reason for this failure?

A.The ClusterRole lacks the required verbs ('get', 'list', 'watch') or resources ('configmaps') for that API group.
B.ClusterRoleBindings cannot be used with ConfigMaps.
C.ClusterRoleBindings are automatically disabled in 'kube-system'.
D.ConfigMaps in 'kube-system' can only be accessed using ServiceAccounts named 'default'.
AnswerA

RBAC permissions are explicitly defined by resource and verb combinations; if 'configmaps' or verbs are missing, access is denied.

Why this answer

While ClusterRoleBindings grant cluster-wide access, certain system namespaces or sensitive resources may be protected or restricted, or the ClusterRole might not include the correct API groups/resources. However, a common security hardening practice or misconfiguration involves incorrect rule definitions, or the verbs/resources mismatch. Specifically, let's look at the options: missing verbs, or standard RBAC behavior where ClusterRoleBindings apply everywhere unless restricted.

Wait, let's examine option A.

168
MCQmedium

An attacker who achieves remote code execution inside a misconfigured container discovers that the service account token mounted at /var/run/secrets/kubernetes.io/serviceaccount/token has cluster-wide administrative permissions. Which Kubernetes security feature should be enabled on the ServiceAccount to mitigate the risk of token theft and misuse?

A.Disabling automatic token mounting (automountServiceAccountToken: false) and utilizing projected volumes with bound audiences
B.Configuring a default Deny-All NetworkPolicy for the kube-system namespace
C.Enabling the NodeRestriction admission plugin
D.EnablingAnonymousAuth on the kube-apiserver
AnswerA

Correct. Disabling unnecessary token mounts and using audience-bound projected tokens limits token blast radius and lifespan.

Why this answer

AutomountServiceAccountToken can be set to false at the ServiceAccount or Pod level to prevent unnecessary token mounting, and projected service account tokens with audience restrictions improve token security.

169
MCQeasy

Which of the following represents a common cloud-native supply chain attack vector where malicious actors publish packages with names similar to popular libraries?

A.Kernel memory exploitation via unprivileged user namespaces
B.Denial of Service via packet flooding
C.Man-in-the-Middle etcd keystore sniffing
D.Typosquatting
AnswerD

Typosquatting relies on human error where developers misspell dependency names, inadvertently pulling malicious packages into the build.

Why this answer

Typosquatting involves registering package names in public repositories (like npm, PyPI, or container registries) that closely resemble popular libraries to trick developers.

170
MCQmedium

You are deploying a ValidatingWebhookConfiguration to inspect incoming pod creations. What happens if the webhook fails and the 'failurePolicy' in the webhook configuration is set to 'Fail'?

A.The API request is allowed to proceed without validation.
B.The API request is rejected.
C.The pod is created in a suspended state until the webhook recovers.
D.The kube-apiserver restarts automatically.
AnswerB

A failurePolicy of 'Fail' means webhook errors result in request rejection (fail closed).

Why this answer

When failurePolicy is set to 'Fail', any error or timeout reaching the external webhook causes the API server to reject the API request.

171
MCQmedium

A security team discovers that a vulnerability in a third-party open-source npm library has been exploited inside a running container in a production Kubernetes cluster. Based on the 4Cs of Cloud Native Security, which layer should be modified first to fix the root cause of this vulnerability?

A.Container layer
B.Code layer
C.Cluster layer
D.Cloud layer
AnswerB

Vulnerabilities in third-party libraries originate in the Code layer and must be patched in the source code or dependencies.

Why this answer

The root cause of a vulnerability in a third-party library bundled inside the application is located at the Code layer. Fixing it requires updating the source code or dependency manifest and rebuilding the container image.

172
MCQeasy

A security engineer is designing a defense-in-depth strategy for a cloud native application deployment. Which of the following best exemplifies the 'defense-in-depth' principle across the 4Cs layers?

A.Granting cluster-admin permissions to all developers to ensure rapid troubleshooting.
B.Disabling authentication mechanisms to reduce operational overhead.
C.Applying strong firewall rules only at the perimeter of the corporate network.
D.Implementing security controls at every layer from Code to Cloud so that a compromise at one layer does not result in total system failure.
AnswerD

Defense-in-depth across the 4Cs ensures overlapping security controls across Code, Container, Cluster, and Cloud.

Why this answer

Defense-in-depth relies on multiple layers of security so that if one layer fails, subsequent layers provide protection (e.g., secure code, hardened container images, RBAC-secured clusters, and encrypted cloud storage).

173
MCQmedium

An auditor notices that the kubelet on worker nodes is configured with --protect-kernel-defaults=true. What is the security purpose of this flag?

A.It ensures that critical kernel parameters match expected secure baseline settings and prevents unauthorized modification.
B.It encrypts all kernel log (kmsg) outputs.
C.It prevents the Linux kernel from running container workloads as root.
D.It forces the kubelet to run inside an isolated kernel container.
AnswerA

Protecting kernel defaults prevents containers or misconfigurations from silently lowering node kernel security baselines.

Why this answer

This flag causes the kubelet to error out if specific kernel tuning flags (like vm.max_map_count or panic_on_oom) do not match expected secure defaults.

174
MCQeasy

Under the cloud native shared responsibility model, who is responsible for ensuring that the underlying physical servers and hardware security modules (HSMs) are secure and compliant?

A.The container registry administrator
B.The application developer
C.The Kubernetes administrator
D.The cloud service provider
AnswerD

The provider is responsible for security 'of' the cloud, including physical hardware.

Why this answer

The cloud provider owns the physical infrastructure, data centers, and underlying hardware.

175
MCQeasy

Which service account permission model is used by default when a pod is created without specifying a service account name?

A.The 'default' service account in the pod's namespace.
B.No service account is assigned.
C.The 'cluster-admin' service account.
D.The 'kube-system' privileged service account.
AnswerA

Pods automatically receive the default service account if none is provided.

Why this answer

Every namespace contains a service account named 'default' which is automatically assigned to pods if no other account is specified.

176
MCQeasy

Which component is responsible for executing probes (liveness, readiness, startup) against containers running on a worker node?

A.kube-scheduler
B.kube-controller-manager
C.kubelet
D.kube-apiserver
AnswerC

Kubelet runs container probes and reports their status to the API server.

Why this answer

The kubelet executes liveness, readiness, and startup probes directly for containers on its node.

177
Multi-Selecthard

Which THREE configurations should be applied to a Kubernetes Pod Security Standard 'restricted' profile compliance checklist? (Choose three)

Select 3 answers
A.Allowing privileged: true for all application containers
B.Restricting container capabilities to drop ALL and only permit essential ones like NET_BIND_SERVICE
C.Setting allowPrivilegeEscalation to false in the container securityContext
D.Mounting the host root filesystem in read-write mode
E.Requiring runAsNonRoot to be true
AnswersB, C, E

Restricted profiles require dropping all default capabilities except optionally NET_BIND_SERVICE.

Why this answer

The Restricted Pod Security Standard requires running as non-root, disabling privilege escalation, and restricting dangerous capabilities.

178
MCQeasy

An administrator needs to evaluate an existing Kubernetes cluster against the CIS Kubernetes Benchmark. Which tool provides automated scanning specifically tailored to this benchmark?

A.kube-hunter
B.falco
C.velero
D.kube-bench
AnswerD

kube-bench runs checks based on the CIS Kubernetes Benchmark.

Why this answer

Kube-bench is an open-source tool that checks whether Kubernetes is deployed securely by running the checks documented in the CIS Kubernetes Benchmark.

179
MCQmedium

An organization requires that all container images pulled into a Kubernetes cluster are cryptographically signed and verified before execution. Which tool integrates with Kubernetes admission control to enforce signature verification using Cosign?

A.Cilium CNI plugin
B.Metrics-server
C.Kyverno policy engine
D.Helm package manager
AnswerC

Kyverno supports native image verification rules using Cosign signatures and public keys.

Why this answer

Policy engines such as Kyverno or OPA Gatekeeper integrate with Sigstore Cosign to verify container image signatures during admission control.

180
MCQeasy

In a cloud native environment, what is the primary security purpose of using static code analysis (SAST) and software composition analysis (SCA) tools in the CI/CD pipeline?

A.To provision cloud networking security groups automatically
B.To manage worker node operating system updates
C.To identify vulnerabilities and insecure coding patterns in the Code layer before deployment
D.To detect running process anomalies in production pods
AnswerC

SAST and SCA analyze source code and dependencies during the build/code phase.

Why this answer

SAST and SCA tools detect security flaws and vulnerable dependencies in source code and libraries before building artifacts.

181
MCQhard

An organization is building a secure software supply chain for Kubernetes. They want to ensure that containers running in the cluster were built from verified source code and passed automated security gates. Which tool combination supports this attestation and verification pipeline?

A.Cosign for cryptographic image signing, SBOM generation, and admission controllers for policy enforcement
B.HorizontalPodAutoscaler and Metrics Server integration
C.kube-proxy for CNI routing and CoreDNS for internal name resolution
D.etcd snapshots and kubeadm control plane bootstrapping scripts
AnswerA

Cosign signs container images and generates SBOMs, while admission policy engines verify these signatures and materials prior to deployment.

Why this answer

Tools like Tekton or GitHub Actions for CI/CD, Cosign for signing images and generating SBOMs (Software Bill of Materials), and Kyverno or OPA Gatekeeper for admission control verification form a complete software supply chain security framework.

182
MCQeasy

An auditor is reviewing the Kubernetes attack surface and notes that a container is running with privileged: true in its securityContext. Which threat model risk does this setting introduce?

A.It prevents the container from writing to ephemeral storage volumes.
B.It forces the kubelet to restart the container continuously due to failing readiness probes.
C.It completely disables the Kubernetes DNS resolution service for the pod.
D.It disables container isolation, granting the container root-equivalent access to the underlying host node.
AnswerD

Correct. Privileged mode removes namespace and cgroup restrictions, allowing container escape and direct host compromise.

Why this answer

Running a container in privileged mode disables almost all security isolation provided by the Linux kernel, granting the container full access to the host node's devices and kernel capabilities.

183
MCQmedium

An application pod needs to access the Kubernetes API server securely. How does Kubernetes authenticate the pod by default when it communicates with the API server?

A.Using static username and password credentials stored in environment variables.
B.Using a ServiceAccount bearer token mounted inside the pod's filesystem.
C.Using mutual TLS (mTLS) client certificates generated by the kubelet on startup.
D.Using SSH keys stored in the pod's root directory.
AnswerB

Pods authenticate to the API server via the projected ServiceAccount token.

Why this answer

Kubernetes automatically mounts a ServiceAccount token into the pod's filesystem, which the pod sends as a Bearer token to authenticate with the API server.

184
MCQmedium

An organization wants to prevent supply chain attacks where compromised base images are pulled from public registries. Which control directly addresses this risk in a cloud native environment?

A.Implementing Kubernetes Horizontal Pod Autoscalers
B.Disabling all outbound internet access from cluster worker nodes
C.Enabling audit logging on the Kubernetes API server
D.Restricting container image pulls to approved, scanned internal registries using admission controllers
AnswerD

Ensuring images come only from approved, scanned registries prevents untrusted public image usage.

Why this answer

Enforcing trusted registry sources and using verified base images mitigates container supply chain risks.

185
MCQmedium

A security auditor discovers that anonymous authentication is accidentally enabled on the Kubernetes API server, allowing unauthenticated read access to cluster health endpoints. Which API server flag must be modified to disable anonymous requests?

A.--secure-port=0
B.--authorization-mode=AlwaysAllow
C.--anonymous-auth=false
D.--disable-anonymous=true
AnswerC

This is the correct flag to disable anonymous requests on the kube-apiserver.

Why this answer

Setting --anonymous-auth=false explicitly disables requests that are not rejected by other authenticators from being treated as anonymous.

186
MCQmedium

A developer builds a Docker container image using an outdated base image that contains known critical operating system vulnerabilities. Before deploying this image to a production Kubernetes cluster, which security practice should be enforced to detect this issue?

A.Enabling Kubernetes Role-Based Access Control (RBAC).
B.Configuring static container image vulnerability scanning in the CI/CD pipeline.
C.Deploying a network mesh like Istio with mutual TLS.
D.Applying Pod Security Standards at the Restricted level.
AnswerB

Image vulnerability scanning detects known OS and package flaws in container images before deployment.

Why this answer

Scanning container images for vulnerabilities prior to deployment targets the Container layer in the 4Cs model, ensuring vulnerable packages do not reach production clusters.

187
MCQmedium

A security engineer wants to inspect container runtime logs for potential security violations or runtime errors. Which log file or mechanism on a worker node managed by systemd and containerd provides container lifecycle events?

A.kubectl get events --all-namespaces
B.journalctl -u containerd
C./var/log/coredns.log
D./var/log/kube-apiserver.log
AnswerB

Containerd runs as a systemd service, so its logs and runtime messages are captured by journalctl.

Why this answer

In Kubernetes nodes managed by systemd, containerd logs its activities and container lifecycle events to the systemd journal, which can be queried using journalctl.

188
Multi-Selectmedium

A security architect is designing role-based access control (RBAC) to comply with NIST access control principles of least privilege. Which THREE best practices should be followed when creating Roles and ClusterRoles? (Choose THREE)

Select 3 answers
A.Scrutinize and restrict the use of ClusterRoleBindings to cluster-wide resources
B.Avoid using wildcards (*) in API groups, resources, and verbs where possible
C.Allow all users to read Kubernetes Secrets by default
D.Grant cluster-admin permissions to all application service accounts for ease of deployment
E.Regularly audit RBAC permissions and bindings
AnswersA, B, E

ClusterRoleBindings grant cluster-wide access and should be tightly controlled.

Why this answer

Least privilege requires avoiding wildcards, scoping permissions tightly, and auditing bindings.

189
MCQeasy

A developer accidentally hardcodes a database password directly into a container's environment variables within a Deployment manifest. According to the Kubernetes threat model, what is the primary risk associated with storing plaintext secrets as environment variables?

A.Environment variables require etcd encryption at rest to function correctly.
B.Environment variables are automatically logged in plain text by the container runtime logs and can be viewed via kubectl describe pod.
C.Environment variables cannot be read by the application running inside the container.
D.Environment variables prevent the pod from passing liveness probes.
AnswerB

Correct. Pod specifications and environment variables are visible via kubectl describe and can be exposed through logs or process inspectors.

Why this answer

Environment variables are visible to anyone who can inspect the pod specification, view process listings inside the container, or access certain debugging endpoints, making them less secure than Kubernetes Secrets mounted as volumes.

190
MCQhard

A security team is evaluating the attack surface of the Kubernetes control plane. They notice that the kubelet API port 10250 is accessible from the internal pod network without proper authorization checks if authentication defaults are misconfigured. What is the primary threat vector associated with an unauthenticated, accessible kubelet API?

A.Execution of arbitrary commands inside running containers via the kubelet exec and run endpoints
B.Direct modification of etcd key-value pairs stored on the master node
C.Bypassing container image vulnerability scanners running in the CI/CD pipeline
D.Forcing the API server to issue new root certificates via TLS bootstrapping
AnswerA

Correct. An exposed kubelet API permits executing commands in pods running on that node, bypassing API server RBAC.

Why this answer

An unauthenticated kubelet API allows attackers to run commands inside containers (via the exec/run APIs), read logs, and extract sensitive information from the node.

191
MCQmedium

An organization wants to enforce that no containers run with privileged security contexts across multiple clusters. They implement admission control validation. In the context of cloud native security principles, what type of control is this?

A.Preventative automated policy control
B.Detective manual control
C.Corrective physical control
D.Compensating detective control
AnswerA

Preventative automated controls block non-compliant configurations before they enter the cluster.

Why this answer

Enforcing policies programmatically at admission time is an example of preventative automated policy enforcement.

192
MCQhard

An attacker with read access to Kubernetes Secrets inspects a secret containing TLS private keys. Under the STRIDE threat model, what specific threat category does this represent regarding confidentiality?

A.Denial of Service
B.Elevation of Privilege
C.Information Disclosure
D.Repudiation
AnswerC

Exposing cryptographic keys and confidential secrets violates data confidentiality, falling under Information Disclosure.

Why this answer

Unauthorized reading of sensitive data like TLS keys, API tokens, or passwords constitutes Information Disclosure.

193
MCQeasy

An administrator wishes to inspect which admission controllers are currently enabled in a running Kubernetes cluster. Where is this typically configured in a stacked control plane?

A.In the kube-apiserver static pod manifest file under '/etc/kubernetes/manifests/kube-apiserver.yaml'.
B.In the CoreDNS deployment spec.
C.In the kubelet configuration file on each worker node.
D.In the cluster-wide ConfigMap named 'kube-system/cluster-admission'.
AnswerA

The API server configuration file defines active admission plugins.

Why this answer

Admission controllers are configured via the '--enable-admission-plugins' flag on the kube-apiserver static pod manifest.

194
Multi-Selecthard

Which THREE features are enforced or verified by the Kubernetes 'restricted' Pod Security Standard profile?

Select 3 answers
A.Allows containers to run in privileged mode if requested
B.Requires dropping all capabilities except NET_BIND_SERVICE
C.Prohibits privilege escalation (allowPrivilegeEscalation: false)
D.Permits mounting the host network namespace without restriction
E.Enforces running as non-root (runAsNonRoot: true)
AnswersB, C, E

Restricted profile restricts Linux capabilities.

Why this answer

The restricted profile enforces running as non-root, dropping all capabilities (or keeping only NET_BIND_SERVICE), and prohibiting privilege escalation.

195
MCQmedium

An administrator wants to limit the blast radius if an attacker compromises a worker node. Which setting ensures that the kubelet does not automatically create or modify ServiceAccount tokens for pods unless explicitly requested?

A.Configure the API server with --disable-service-accounts=true.
B.Set kubelet flag --encrypt-tokens=true.
C.Set serviceAccountAutoMount: false or automountServiceAccountToken: false on service accounts or pod specs.
D.Enable etcd encryption for service account tokens.
AnswerC

Setting automountServiceAccountToken to false prevents the kubelet from projecting service account tokens into pod filesystems.

Why this answer

Disabling automatic service account token mounting across namespaces or via pod specs limits credential exposure.

196
Multi-Selectmedium

Which TWO of the following methods can be used to authenticate users or systems against the Kubernetes API server? (Choose TWO)

Select 2 answers
A.X.509 client certificates validated by the API server CA.
B.Unencrypted HTTP basic auth files with default passwords.
C.Anonymous packet sniffing via kube-proxy.
D.OpenID Connect (OIDC) tokens issued by an external identity provider.
E.Direct root SSH access to etcd nodes.
AnswersA, D

Client certificates are widely used for authenticating administrators, nodes, and controllers.

Why this answer

OpenID Connect (OIDC) tokens and X.509 client certificates are standard native authentication methods for the API server.

197
Multi-Selectmedium

Which TWO mechanisms are used by Kubernetes admission controllers to enforce security policies during the API request lifecycle?

Select 2 answers
A.Validating admission webhooks can reject object definitions that violate security standards.
B.kubelet automatically runs security audits on all container images prior to pull.
C.etcd executes consensus validation scripts to strip unauthorized RBAC rules.
D.Mutating admission webhooks can alter request payloads to enforce defaults like securityContext constraints.
E.kube-proxy inspects network payloads at Layer 7 to block unauthorized API requests.
AnswersA, D

Validating webhooks inspect the final object state and return a pass/fail decision to the API server.

Why this answer

Mutating admission controllers can modify incoming objects before they are persisted, and Validating admission controllers can evaluate and reject non-compliant requests.

198
MCQmedium

An application pod needs to mount a Secret as environment variables. Which section of the Pod manifest should be configured to achieve this securely?

A.Using 'env' with 'valueFrom.secretKeyRef' or 'envFrom' with 'secretRef' in the container specification.
B.Using 'volumeMounts' pointing to a PersistentVolumeClaim bound to the Secret.
C.Adding the Secret name directly to the container imagePullSecrets field.
D.Declaring the Secret in the container securityContext block.
AnswerA

These are the correct fields for injecting Secret data as environment variables into containers.

Why this answer

Environment variables can be populated from Secrets using 'envFrom' or 'env' with 'valueFrom.secretKeyRef'.

199
Multi-Selecthard

Which THREE of the following components are typically the responsibility of the user (rather than the cloud provider) in a managed Kubernetes service (like EKS, GKE, or AKS) under the shared responsibility model?

Select 3 answers
A.Implementing container image vulnerability management and hardening base images.
B.Manufacturing the physical hardware and server racks in the data center.
C.Configuring Kubernetes RBAC roles and role bindings.
D.Writing secure application code and managing third-party dependencies.
E.Applying security patches to the managed cloud control plane master nodes.
AnswersA, C, D

Container image security is the user's responsibility (Container layer).

Why this answer

In managed Kubernetes, the provider manages the control plane infrastructure and cloud hardware (Cloud layer). The user is responsible for cluster configurations (Cluster), container images (Container), and application source code (Code).

200
MCQeasy

Which Kubernetes control plane component runs controllers that handle routine tasks such as replicating pods and managing service accounts?

A.CoreDNS
B.kube-controller-manager
C.etcd
D.kube-proxy
AnswerB

This component executes core reconciliation loops.

Why this answer

The kube-controller-manager houses core control loops including the replication controller, service account controller, and namespace controller.

201
Multi-Selectmedium

Which THREE of the following tasks are performed by the Kubernetes control plane's kube-controller-manager? (Choose THREE)

Select 3 answers
A.Managing node lifecycle status and detecting node failures.
B.Maintaining desired pod replica counts via ReplicaSets.
C.Running container workloads directly on worker node operating systems.
D.Generating and managing ServiceAccount tokens and default namespace tokens.
E.Configuring iptables and IPVS rules for Kubernetes Services on nodes.
AnswersA, B, D

The node lifecycle controller runs inside kube-controller-manager.

Why this answer

The controller manager runs node, service account, and replication controllers.

202
MCQmedium

An Ingress controller is deployed in a cluster, and security auditors request that incoming traffic must be restricted to specific trusted external CIDR blocks. Which standard Ingress annotation is commonly supported by popular Ingress controllers (such as ingress-nginx) to achieve IP-based allowlisting?

A.ingress.kubernetes.io/allowed-source-cidrs
B.networking.k8s.io/ip-filter
C.nginx.ingress.kubernetes.io/whitelist-source-range
D.kubernetes.io/ingress.allow-ips
AnswerC

This is the correct ingress-nginx annotation used to define allowed source IP ranges for incoming traffic.

Why this answer

Popular Ingress controllers like ingress-nginx support annotations such as nginx.ingress.kubernetes.io/whitelist-source-range to restrict access to specified client IP CIDRs.

203
Multi-Selecteasy

Which TWO of the following are core security hardening best practices for the Kubernetes API server? (Choose TWO)

Select 2 answers
A.Ensure the insecure port (--insecure-port) is disabled or set to 0.
B.Configure the API server to use HTTP instead of HTTPS for performance.
C.Store all kubeconfig credentials in public ConfigMaps.
D.Grant cluster-admin permissions to all authenticated users by default.
E.Disable anonymous authentication by setting --anonymous-auth=false.
AnswersA, E

Disabling the insecure port stops unauthenticated HTTP access.

Why this answer

Disabling anonymous requests and enforcing strong TLS versions are essential API server hardening steps.

204
MCQmedium

An attacker compromises a cluster node and attempts to inspect container communication. By default, how is pod-to-pod network traffic handled across different nodes in a standard Kubernetes cluster without a service mesh or CNI encryption enabled?

A.Encrypted automatically using mandatory 256-bit AES transport layer security
B.Blocked entirely by default unless a LoadBalancer service is declared
C.Routed exclusively through the etcd secure TLS database tunnel
D.Transmitted in plain text across the network fabric, making it vulnerable to sniffing
AnswerD

Default CNI configurations do not encrypt node-to-node or pod-to-pod transit traffic, allowing packet capture on intermediate networks.

Why this answer

Standard Kubernetes CNI plugins transmit pod-to-pod traffic in plain text across the underlying network fabric unless an encrypted overlay network (like IPsec or WireGuard) or a service mesh providing mTLS is configured.

205
MCQmedium

An organization's security team mandates that all Kubernetes worker nodes must be scanned for Common Vulnerabilities and Exposures (CVEs) on a scheduled basis. Under the 4Cs, what layer does node vulnerability scanning address?

A.Container layer
B.Cloud layer
C.Cluster layer
D.Code layer
AnswerC

Node vulnerability scanning evaluates the operating system and components of the Cluster layer.

Why this answer

Scanning worker node operating systems for CVEs targets the Cluster layer.

206
MCQmedium

Your team is implementing image caching and proxying to protect against external container registry rate limits and security incidents. Which upstream project acts as a CNCF-compliant registry proxy and caching mechanism?

A.Harbor
B.Fluentd
C.Jaeger
D.Prometheus
AnswerA

Harbor is a CNCF artifact registry that provides security features like vulnerability scanning, signing, and proxy caching.

Why this answer

Harbor is an open-source, CNCF-graded cloud-native registry that stores, signs, and scans content with vulnerability management and proxy caching features.

207
MCQhard

An auditor is reviewing compliance with CIS Kubernetes Benchmark control 1.2.20, which relates to the kube-apiserver admission control configuration. Which admission plugin is recommended by CIS to prevent default service accounts from automatically mounting API credentials?

A.DefaultTolerationSeconds
B.AlwaysAdmit
C.NodeRestriction
D.ServiceAccount
AnswerD

The ServiceAccount admission controller manages service account creation and token defaults.

Why this answer

The ServiceAccount admission controller, along with disabling automatic token mounting via serviceAccountName/automountServiceAccountToken, is governed by admission plugins. Specifically, NamespaceLifecycle and PodNodeSecurity are relevant, but for service account automation management, the ServiceAccount admission controller governs default behavior.

208
Multi-Selecteasy

Which TWO components are core parts of the Kubernetes authorization architecture? (Choose TWO)

Select 2 answers
A.Webhook Authorization
B.Role-Based Access Control (RBAC)
C.CoreDNS service discovery
D.Kubelet node daemon
E.etcd key-value datastore
AnswersA, B

Kubernetes supports external authorization via webhook token/request evaluation.

Why this answer

RBAC and Webhook are authorization modes evaluated by the API server after authentication.

209
MCQhard

You need to audit the cryptographic algorithms and TLS versions permitted by the Kubernetes API server for incoming client connections. Which API server flag enforces a minimum TLS version of 1.3?

A.--min-tls=1.3
B.--tls-min-version=VersionTLS13
C.--cipher-suites=TLS_AES_256_GCM_SHA384
D.--ssl-version=TLSv3
AnswerB

VersionTLS13 restricts secure connections exclusively to TLS version 1.3.

Why this answer

The --tls-min-version flag allows administrators to specify the minimum acceptable TLS protocol version.

210
Multi-Selecthard

Which THREE of the following activities fall under the customer's responsibility in the shared responsibility model when running Kubernetes on cloud infrastructure? (Choose THREE)

Select 3 answers
A.Physical security and environmental controls of the cloud provider data center
B.Patching and updating the worker node operating system kernel
C.Managing the underlying physical hypervisors hosting virtual machines
D.Configuring Kubernetes RBAC and network policies
E.Developing, scanning, and deploying container workloads and manifests
AnswersB, D, E

Worker node OS and kernel updates are the customer's responsibility.

Why this answer

Customers are responsible for worker node configuration, cluster security patching, workload management, and IAM policies.

211
MCQhard

You are reviewing security logs on a control plane node and discover that an unauthenticated user accessed the kubelet's HTTPS port (10250) to execute commands inside containers. How should you restrict kubelet authentication and authorization to prevent this?

A.Enable the kubelet insecure-port flag.
B.Set authorization.mode: AlwaysAllow in the kubelet configuration file.
C.Disable the API server proxy subresource.
D.Set authentication.anonymous.enabled: false and authorization.mode: Webhook in the kubelet configuration file.
AnswerD

This ensures the kubelet delegates authorization decisions back to the API server via RBAC rather than allowing unauthenticated access.

Why this answer

Kubelet must be configured with authentication enabled (such as X509 client certs or webhook token auth) and authorization set to Webhook.

212
MCQhard

During a supply chain security audit, a platform engineer discovers that container images deployed into the cluster are being pulled from public registries without cryptographic verification of their provenance or integrity. Which integrated Kubernetes security control should be implemented alongside an admission webhook to verify image signatures before admission?

A.Kubelet TLS bootstrapping
B.Secret encryption at rest using a KMS provider
C.Policy-based admission control with Sigstore Cosign verification
D.ImagePolicyWebhook
AnswerC

Correct. Validating admission policies or webhooks integrated with Cosign verify container image signatures and provenance at deploy time.

Why this answer

Admission controllers like Kyverno or OPA Gatekeeper can integrate with tools like Cosign to enforce image signature verification prior to allowing a pod to be scheduled.

213
Multi-Selectmedium

Which THREE of the following practices should be implemented to secure etcd in a production Kubernetes deployment? (Choose THREE)

Select 3 answers
A.Disable TLS verification to simplify certificate rotation.
B.Enable client certificate authentication using --client-cert-auth=true.
C.Expose etcd on a public internet IP address without authentication for easy monitoring.
D.Encrypt data at rest in etcd using an EncryptionConfiguration file.
E.Enable peer-to-peer encryption and mutual TLS using peer certificate flags.
AnswersB, D, E

Enforcing client cert auth ensures clients like the API server are cryptographically verified.

Why this answer

Etcd security relies on mTLS for client and peer connections, and encryption at rest.

214
MCQmedium

A security engineer discovers that an attacker has gained access to a container and is attempting to modify container files in a way that persists across pod restarts if the container image is faulty. However, the root filesystem is marked as readOnlyRootFilesystem: true. What is the impact of this setting on the attack?

A.It enforces TLS encryption for all outbound pod network connections.
B.It mitigates threats by preventing attackers from writing malicious binaries or modifying system files in the root filesystem.
C.It automatically encrypts all environment variables stored in the Pod spec.
D.It completely prevents any container from starting up if PersistentVolumeClaims are attached.
AnswerB

A read-only root filesystem blocks runtime tampering of system binaries inside the container image layer.

Why this answer

Setting readOnlyRootFilesystem to true prevents writes to the container's root filesystem, forcing attackers to use emptyDir or mounted volumes if they wish to write malicious binaries or tools.

215
MCQhard

A security engineer configures a ValidatingWebhookConfiguration to intercept pod creations. The webhook service goes down due to a network partition. What happens to incoming pod creation requests by default if the webhook 'failurePolicy' is set to 'Fail'?

A.The kubelet automatically bypasses the webhook and starts the container locally.
B.The API server allows the pod creation request and logs a warning.
C.The API server rejects the pod creation request with an error.
D.The API server queues the request until the webhook service recovers.
AnswerC

A 'Fail' policy treats webhook unavailability as a validation failure, blocking the request.

Why this answer

When failurePolicy is set to 'Fail', if the webhook encounters an error or is unreachable, the API server rejects the request.

216
Multi-Selectmedium

Which THREE conditions must be met for a RoleBinding to successfully grant permissions to a ServiceAccount?

Select 3 answers
A.The kubelet must restart to load the binding.
B.The RoleBinding and Role must reside in the same namespace (if using a Role).
C.The RoleBinding must reference an existing Role or ClusterRole.
D.The ServiceAccount must have cluster-admin privileges.
E.The ServiceAccount subject must be correctly specified with its name and namespace.
AnswersB, C, E

Namespaced RoleBindings and Roles must be in the same namespace.

Why this answer

A RoleBinding requires a valid Role/ClusterRole reference, valid subjects (ServiceAccount), and must exist in the correct namespace (for RoleBindings).

217
Multi-Selectmedium

Which THREE of the following represent security risks or anti-patterns in cloud native application design? (Choose THREE)

Select 3 answers
A.Exposing the Kubernetes dashboard or debug endpoints publicly without authentication
B.Implementing automated vulnerability scanning in CI/CD pipelines
C.Using immutable infrastructure principles for cluster worker nodes
D.Running container processes with root user IDs inside the container
E.Storing sensitive API keys and database passwords in plain text within Kubernetes ConfigMaps
AnswersA, D, E

Exposing unauthenticated administrative interfaces invites compromise.

Why this answer

Running containers as root, storing unencrypted secrets, and exposing dashboard endpoints without auth are major security anti-patterns.

218
MCQmedium

A security engineer is hardening a Kubernetes cluster and wants to ensure that all container images are pulled only from an approved internal container registry (e.g., registry.internal.corp). Which Kubernetes mechanism can enforce this restriction across all namespaces?

A.Deploying a validating admission policy or webhook to check image registry URLs
B.Configuring NodePort service selectors
C.Enabling horizontal pod autoscaling
D.Modifying the kube-proxy IPVS configuration
AnswerA

Validating admission webhooks can inspect pod specs and reject pods using images from unauthorized registries.

Why this answer

Admission webhook policy engines like Kyverno or OPA Gatekeeper can intercept creation requests and validate that the image URL matches the approved registry domain prefix.

219
Multi-Selectmedium

Which THREE of the following practices should be followed when configuring Kubernetes audit logging? (Choose THREE)

Select 3 answers
A.Store audit logs in unencrypted public ConfigMaps.
B.Disable audit logging entirely to maximize API server performance.
C.Monitor audit logs regularly for suspicious authentication failures or privilege escalations.
D.Store audit logs in a secure location with restricted file permissions on the host or ship them to a SIEM.
E.Define an explicit audit policy file detailing which log levels and events to capture.
AnswersC, D, E

Audit log analysis helps detect security breaches.

Why this answer

Audit logging should use a defined policy, specify a secure log output path, and protect log files from unauthorized modification.

220
MCQeasy

An engineer needs to verify that the kubelet on worker nodes is not allowing unauthenticated requests. Which configuration parameter in the kubelet configuration file disables anonymous access?

A.anonymousAuth: "Disabled"
B.enableAnonymousAccess: false
C.authentication.anonymous.enabled: false
D.readOnlyPort: 0
AnswerC

Setting this to false ensures all requests to the kubelet must be authenticated.

Why this answer

The authentication.anonymous.enabled setting in the kubelet configuration file controls whether anonymous requests are accepted.

221
Multi-Selecthard

Which THREE of the following capabilities or runtime configurations pose extreme risks of container escape when granted to an untrusted workload?

Select 3 answers
A.`hostPID: true` sharing the host process namespace
B.Setting `automountServiceAccountToken: false` on the service account
C.`securityContext.privileged: true`
D.Granting the `CAP_SYS_ADMIN` capability in the container security context
E.Setting `readOnlyRootFilesystem: true` in the container specification
AnswersA, C, D

Sharing host PID lets container processes see and potentially signal or ptrace host processes.

Why this answer

CAP_SYS_ADMIN, privileged mode, and hostPID/hostIPC namespace sharing all provide powerful vectors for breaking container boundaries.

222
Multi-Selecteasy

Which TWO of the following tasks are handled by the kube-scheduler? (Choose TWO)

Select 2 answers
A.Generating X.509 client certificates for cluster bootstrapping.
B.Evaluating pending pods and selecting suitable worker nodes for placement.
C.Respecting node taints, tolerations, and affinity rules during scheduling.
D.Managing encryption keys inside the etcd database.
E.Executing container liveness probes inside running pods.
AnswersB, C

Scheduler matches pods to nodes.

Why this answer

The kube-scheduler selects a node for unassigned pods based on resource availability and constraints.

223
Multi-Selectmedium

A cluster administrator is conducting a threat analysis regarding supply chain vulnerabilities in container registries and deployment pipelines. Which TWO of the following practices directly mitigate supply chain threats in Kubernetes? (Choose TWO)

Select 2 answers
A.Increasing the CPU limits on all worker nodes to handle larger container images
B.Enforcing cryptographic image signing and verification using tools like Sigstore Cosign
C.Configuring static IP addresses for all worker nodes in the private subnet
D.Integrating automated vulnerability scanning into the CI/CD pipeline before pushing images to the registry
E.Disabling the default token automount on all namespaces globally
AnswersB, D

Correct. Image signing ensures that only artifacts from trusted build pipelines are deployed.

Why this answer

Supply chain security involves verifying software provenance and minimizing vulnerabilities. Using trusted signed base images and scanning images before deployment directly addresses supply chain vectors.

224
MCQeasy

What is the primary security benefit of implementing Ingress TLS termination at the ingress controller rather than inside the application pods?

A.Automatically encrypting persistent volume storage
B.Centralized certificate management and reduced cryptographic overhead on application pods
C.Preventing the container runtime from executing untrusted binaries
D.Ensuring that all pod-to-pod communication is blocked
AnswerB

Centralizing TLS termination simplifies certificate renewal and protects backend pods from TLS processing overhead.

Why this answer

Terminating TLS at the ingress controller centralizes certificate management and offloads cryptographic overhead from the backend application pods.

225
MCQhard

An administrator wishes to create a NetworkPolicy that allows incoming traffic from any pod in any namespace, provided those pods have the label 'environment=production'. How should the NetworkPolicy 'ingress' rule be structured?

A.Specify an ingress 'from' entry containing a 'namespaceSelector' matching the desired namespaces and a 'podSelector' matching 'environment=production'.
B.Add the production label to the target pod's metadata and reference it in the egress block.
C.Specify only a 'podSelector' with 'environment=production' without any namespace selector.
D.Use a cluster-wide ClusterNetworkPolicy resource with global label matching.
AnswerA

Combining namespaceSelector and podSelector in an ingress rule allows cross-namespace traffic filtering based on labels.

Why this answer

To select pods across namespaces, the 'from' array must use 'namespaceSelector' combined with 'podSelector'.

Page 2

Page 3 of 5

Page 4

All pages