KCSA Kubernetes Workload Security Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Questions: 20 | Updated: Aug 15, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. What is a DaemonSet used for in Kubernetes security monitoring?

Explanation

A DaemonSet ensures that a designated pod runs on every eligible node in a Kubernetes cluster. This makes it useful for deploying security agents that need node-level access to monitor system activity, collect logs, or detect threats consistently across the cluster.

Submit
Please wait...
About This Quiz
Kcsa Kubernetes Workload Security Quiz - Quiz

This quiz evaluates your understanding of Kubernetes workload security practices, including pod security policies, network policies, RBAC, container image scanning, and runtime protection. Designed for college-level learners, it covers medium-difficulty scenarios relevant to securing cloud-native applications and Kubernetes clusters in production environments.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. What is the primary benefit of using namespace isolation in Kubernetes security?

Explanation

Namespace isolation groups Kubernetes resources into distinct logical environments, allowing administrators to apply access controls, quotas, and policies separately. This helps prevent teams or applications from unintentionally viewing or modifying one another’s resources and limits the impact of mistakes or compromised workloads. It supports secure multi-tenancy, though it does not provide complete isolation like separate clusters.

Submit

3. Which container runtime provides enhanced security isolation through gVisor?

Explanation

runsc is the container runtime built for gVisor, which places a user-space application kernel between workloads and the host kernel. By handling or mediating many system calls inside this sandbox, it reduces workloads’ direct exposure to the host kernel and strengthens isolation. In contrast, runc and containerd are standard runtime components, while CRI-O is a Kubernetes container engine.

Submit

4. True or False: A ClusterRole can be bound to a ServiceAccount using a RoleBinding.

Explanation

A RoleBinding can reference a ClusterRole and bind it to a ServiceAccount. The permissions granted by that binding apply only within the RoleBinding’s namespace, even though the ClusterRole itself defines a reusable, cluster-level set of permissions.

Submit

5. What does 'runAsNonRoot: true' enforce in a pod's securityContext?

Explanation

Setting `runAsNonRoot: true` requires the container process to run with a non-zero user ID. If the image or pod configuration would run it as root, Kubernetes rejects the container rather than starting it. This setting does not prevent access to root directories, use of `sudo`, or mounting host volumes.

Submit

6. Which Kubernetes resource defines the set of permissions for a role?

Explanation

A Role defines a set of permissions within a specific namespace, using rules that specify which actions (verbs) can be performed on which resources. A RoleBinding grants those permissions to users, groups, or service accounts; it does not define the permissions itself.

Submit

7. True or False: NetworkPolicy rules apply to traffic within the same pod.

Explanation

NetworkPolicies control ingress and egress traffic to or from pods. Containers in the same pod share a network namespace, so their internal communication—such as traffic over localhost—is not governed by NetworkPolicy rules.

Submit

8. What is the primary function of OPA (Open Policy Agent) in Kubernetes?

Explanation

OPA enforces organization-defined rules for Kubernetes resources, such as restricting deployments to approved images or requiring specific security settings. It evaluates requests against policies, helping ensure consistent governance and compliance across the cluster.

Submit

9. Which feature allows you to run containers with a read-only root filesystem?

Explanation

Setting `readOnlyRootFilesystem: true` in a container’s `securityContext` mounts its root filesystem as read-only, preventing the container from changing files in its image. If the application needs to write data, provide a separate writable volume and mount it at the required path. This can reduce the impact of compromised applications.

Submit

10. True or False: Kubernetes Secrets are encrypted by default at rest in etcd.

Explanation

Kubernetes Secrets are base64-encoded, which is an encoding rather than encryption. By default, their values are stored unencrypted in etcd, so someone with access to the datastore may be able to read them. Encryption at rest must be explicitly configured, for example through Kubernetes encryption providers or a KMS integration.

Submit

11. What is the primary purpose of a Pod Security Policy (PSP) in Kubernetes?

Explanation

A Pod Security Policy (PSP) defines security rules that pod specifications must satisfy, such as restrictions on privileged containers, host access, and allowed capabilities. Kubernetes historically used PSPs during admission to validate and control pod creation, helping prevent workloads from running with unsafe permissions or configurations.

Submit

12. Which image scanning tool is commonly integrated into Kubernetes clusters to detect vulnerabilities?

Explanation

Trivy is an open-source security scanner commonly integrated into Kubernetes workflows to inspect container images for known vulnerabilities before deployment. It can also scan filesystems and Kubernetes configuration for security issues. The other options serve different purposes: kubectl manages clusters, kube-proxy handles network traffic, and etcd stores cluster data.

Submit

13. What does the 'allowPrivilegeEscalation' field in securityContext prevent?

Explanation

`allowPrivilegeEscalation` controls whether a container process can gain more privileges than its parent process, such as through set-user-ID or set-group-ID executables. Setting it to `false` prevents this escalation; it does not, by itself, block host filesystem access, privileged mode, or reading environment variables.

Submit

14. True or False: A ServiceAccount token can be automatically mounted into every pod by default.

Explanation

Kubernetes automatically assigns a ServiceAccount to a pod if none is specified and mounts its token into the pod by default. This can be disabled by setting `automountServiceAccountToken: false` on the pod or ServiceAccount.

Submit

15. Which admission controller enforces Pod Security Standards in Kubernetes?

Explanation

PodSecurityPolicy was an admission controller that evaluated Pod specifications against security rules, such as privilege and capability restrictions, before allowing them. Note that PSP was deprecated in Kubernetes 1.21 and removed in 1.25; Pod Security Admission is its successor for enforcing Pod Security Standards.

Submit

16. What is the purpose of a ClusterRole in Kubernetes RBAC?

Explanation

A ClusterRole groups permissions that can apply to resources throughout a Kubernetes cluster, including cluster-scoped resources such as nodes. Unlike a Role, which is limited to a particular namespace, a ClusterRole can be bound across the cluster or used within a namespace when paired with an appropriate binding.

Submit

17. True or False: Running containers as the root user is a security best practice in Kubernetes.

Explanation

Running containers as root increases the impact of a vulnerability or container compromise because processes may gain unnecessary privileges on the host or other resources. Kubernetes workloads should follow least-privilege principles by using non-root users, restricting Linux capabilities, and applying appropriate security contexts. Root access should be granted only when essential and carefully controlled.

Submit

18. Which field in a pod specification restricts the Linux capabilities available to a container?

Explanation

`securityContext.capabilities` controls which Linux capabilities a container may add or drop. This lets you limit the container’s privileges to only the capabilities it needs, following the principle of least privilege.

Submit

19. What does RBAC stand for in Kubernetes?

Explanation

RBAC stands for Role-Based Access Control. In Kubernetes, it manages permissions by assigning roles to users, groups, or service accounts, controlling which resources they can access and what actions they can perform.

Submit

20. Which Kubernetes object is used to control network traffic between pods?

Explanation

A NetworkPolicy controls network traffic to and from selected pods by defining rules for ingress and egress. Rules can use pod labels, namespaces, and IP blocks to specify which connections are allowed. Its enforcement depends on the cluster’s network plugin supporting NetworkPolicy.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is a DaemonSet used for in Kubernetes security monitoring?
What is the primary benefit of using namespace isolation in Kubernetes...
Which container runtime provides enhanced security isolation through...
True or False: A ClusterRole can be bound to a ServiceAccount using a...
What does 'runAsNonRoot: true' enforce in a pod's securityContext?
Which Kubernetes resource defines the set of permissions for a role?
True or False: NetworkPolicy rules apply to traffic within the same...
What is the primary function of OPA (Open Policy Agent) in Kubernetes?
Which feature allows you to run containers with a read-only root...
True or False: Kubernetes Secrets are encrypted by default at rest in...
What is the primary purpose of a Pod Security Policy (PSP) in...
Which image scanning tool is commonly integrated into Kubernetes...
What does the 'allowPrivilegeEscalation' field in securityContext...
True or False: A ServiceAccount token can be automatically mounted...
Which admission controller enforces Pod Security Standards in...
What is the purpose of a ClusterRole in Kubernetes RBAC?
True or False: Running containers as the root user is a security best...
Which field in a pod specification restricts the Linux capabilities...
What does RBAC stand for in Kubernetes?
Which Kubernetes object is used to control network traffic between...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!