Free practice · No sign-up required

Kubernetes and Cloud Security Associate free practice test

15 questions with answer explanations. Choose an answer below to begin.

Question 1 of 15

What is the primary purpose of a Kubernetes Namespace?

Show hint

Understand core Kubernetes object organization concepts

0/15 answered · Bookmark questions to review later. Focus the practice area to use keys 1–9 and Enter.

Learn by doing

Put your answers into practice

Use official documentation and hands-on labs to work through topics you missed.

Explore all study resources →
Kubernetes application examples

Application examples from the Kubernetes project for practicing manifests and application behavior in a cluster.

Try it: Use a disposable cluster. Read a simple application's manifests, predict which Pods its Service selects, then change a label and use kubectl to diagnose the resulting connectivity problem.

Source is free. A local cluster uses your computer; hosted clusters may incur charges.

Kubernetes official tutorials

Guided tutorials for learning Kubernetes behavior and building practical skills beyond multiple-choice recall.

Try it: Complete a basic application tutorial. Repeat the task without the walkthrough, then explain the difference between declared configuration and observed cluster state.

Documentation is free. Your chosen cluster environment may have costs.

All questions and explanations

Prefer to read at your own pace? Work through each question below, then open its answer to check your reasoning. You can link directly to a question or print this reference.

  1. What is the primary purpose of a Kubernetes Namespace?

    1. To partition cluster resources and scope objects for different teams or projects

    2. To increase the maximum number of nodes in the cluster

    3. To store persistent data for stateful applications

    4. To define the physical hardware layout of worker nodes

    Show answer and explanation

    Correct answer

    • To partition cluster resources and scope objects for different teams or projects

    Namespaces provide a way to divide cluster resources and object scope, helping organize environments and avoid naming collisions. They do not offer strong security isolation by themselves.

  2. Which object is best suited for storing non-confidential configuration data for applications?

    1. Secret

    2. ConfigMap

    3. Volume

    4. ServiceAccount

    Show answer and explanation

    Correct answer

    • ConfigMap

    ConfigMaps are designed to hold non-sensitive configuration data such as environment variables and configuration files. Secrets should be used for sensitive information like passwords.

  3. What does a Kubernetes Service of type ClusterIP do?

    1. Exposes the service on a static port of each node's IP

    2. Exposes the service only to other cluster-internal workloads

    3. Forwards traffic from the internet directly to the pod

    4. Creates a load balancer in all supported cloud providers

    Show answer and explanation

    Correct answer

    • Exposes the service only to other cluster-internal workloads

    ClusterIP is the default service type and provides a stable internal IP address accessible only within the cluster. It is not routable from outside the cluster.

  4. Which practice helps ensure that only approved container images are deployed in a cluster?

    1. Using a private registry without authentication

    2. Implementing an admission controller with image policy checks

    3. Allowing all images via wildcard in deployment specs

    4. Deploying images directly via the kubelet API

    Show answer and explanation

    Correct answer

    • Implementing an admission controller with image policy checks

    Admission controllers can validate and enforce policies, such as allowing only images from approved registries or with specific signatures. This reduces the risk of running unauthorized or malicious images.

  5. What is a common use case for a Kubernetes Pod Security Standard 'restricted' profile?

    1. Allowing any container to run as root for legacy support

    2. Enforcing the least privilege by disallowing privilege escalation and restricting capabilities

    3. Permitting host namespace sharing for debugging

    4. Enabling unrestricted access to the host filesystem

    Show answer and explanation

    Correct answer

    • Enforcing the least privilege by disallowing privilege escalation and restricting capabilities

    The restricted profile implements strong security defaults, including preventing privilege escalation and limiting Linux capabilities. It is intended for production workloads with strict security requirements.

  6. Which resource should you inspect to verify the identity of a service account used by a pod?

    1. Node

    2. Secret

    3. PersistentVolume

    4. Ingress

    Show answer and explanation

    Correct answer

    • Secret

    Service account tokens are stored in Secrets mounted into pods. Inspecting the associated Secret allows you to verify the service account identity and its token.

  7. What is the main security benefit of using Network Policies?

    1. They increase the number of available IP addresses in the cluster

    2. They restrict communication between pod endpoints based on rules

    3. They automatically encrypt all data at rest

    4. They replace the need for firewalls in the cloud provider

    Show answer and explanation

    Correct answer

    • They restrict communication between pod endpoints based on rules

    Network Policies define how groups of pods are allowed to communicate with each other and other network endpoints. This limits lateral movement within the cluster.

  8. Which component of the Kubernetes API server validates and enforces resource quotas?

    1. Scheduler

    2. Controller Manager

    3. Admission Controller

    4. etcd

    Show answer and explanation

    Correct answer

    • Admission Controller

    Admission controllers are plugins that govern and enforce policies on the cluster. Resource quota validation is performed by an admission controller before objects are persisted.

  9. What is a recommended practice for managing RBAC permissions?

    1. Grant cluster-admin to all developers for convenience

    2. Use RoleBindings and ClusterRoleBindings to grant least privilege

    3. Assign permissions directly to user accounts in etcd

    4. Avoid using roles and rely on built-in default permissions

    Show answer and explanation

    Correct answer

    • Use RoleBindings and ClusterRoleBindings to grant least privilege

    RoleBindings and ClusterRoleBindings allow you to grant specific permissions to users or groups following the principle of least privilege. Avoid broad admin rights for routine operations.

  10. Question 10

    Link to question

    Which of the following helps protect API server access from unauthorized clients?

    1. Disabling authentication for all requests

    2. Using Transport Layer Security (TLS) for all API communications

    3. Allowing all IP addresses in firewall rules

    4. Exposing the API server on a public port without restrictions

    Show answer and explanation

    Correct answer

    • Using Transport Layer Security (TLS) for all API communications

    TLS ensures that communications with the API server are encrypted and that clients can verify the server identity. It is a fundamental security control for API access.

  11. Question 11

    Link to question

    What does a Kubernetes Ingress resource typically manage?

    1. Node maintenance and upgrades

    2. HTTP and HTTPS routing to services within the cluster

    3. Storage allocation for persistent volumes

    4. Pod scheduling decisions

    Show answer and explanation

    Correct answer

    • HTTP and HTTPS routing to services within the cluster

    Ingress manages external access to cluster services, typically HTTP and HTTPS routing. It allows defining rules for hostnames, paths, and TLS termination.

  12. Question 12

    Link to question

    Which strategy helps reduce the impact of node failures in a cluster?

    1. Running all workloads on a single node

    2. Using a single availability zone for all nodes

    3. Spreading replicas across multiple nodes and zones

    4. Disabling automated backups

    Show answer and explanation

    Correct answer

    • Spreading replicas across multiple nodes and zones

    High availability is improved by distributing replicas across multiple nodes and availability zones. This ensures workloads remain accessible if a node or zone fails.

  13. Question 13

    Link to question

    What is the purpose of a Readiness Probe in a Kubernetes workload?

    1. To measure the long-term resource usage of a container

    2. To determine if a container is ready to serve traffic

    3. To enforce security policies on the node

    4. To replace liveness probes in all scenarios

    Show answer and explanation

    Correct answer

    • To determine if a container is ready to serve traffic

    Readiness Probes indicate whether a container is prepared to accept requests. If the probe fails, the pod is removed from service endpoints until it becomes ready.

  14. Question 14

    Link to question

    Which control plane component is responsible for maintaining the desired state of the cluster?

    1. kubelet

    2. kube-proxy

    3. controller manager

    4. etcd

    Show answer and explanation

    Correct answer

    • controller manager

    The controller manager runs multiple control loops that watch the cluster state and make adjustments to move the current state toward the desired state. etcd stores the cluster state, while kubelet manages nodes.

  15. Question 15

    Link to question

    Which mechanism ensures that a container cannot gain more privileges than its entry point defines?

    1. Rootless container mode

    2. AllowPrivilegeEscalation set to false

    3. Read-only root filesystem

    4. Pod Security Admission

    Show answer and explanation

    Correct answer

    • AllowPrivilegeEscalation set to false

    Setting allowPrivilegeEscalation to false prevents a process from gaining more privileges than its parent process, which is a key principle for least-privilege container execution.

Read all flashcards

Recall the answer before opening each card.

What is the primary purpose of a Kubernetes Namespace?

To partition cluster resources and scope objects for different teams or projects, avoiding naming collisions but not providing strong isolation.

Which object is best for storing non-confidential configuration data?

ConfigMap, as it stores key-value configuration data like environment variables and config files without encryption.

What does a ClusterIP Service do?

Exposes the service only within the cluster via a stable internal IP, not accessible externally.

How can you ensure only approved container images are deployed?

By implementing an admission controller with image policy checks, such as whitelisting registries or signature verification.

What is a common use case for the restricted Pod Security Standard?

Enforcing least privilege by disallowing privilege escalation, restricting Linux capabilities, and blocking host namespace usage.

Which resource should you inspect to verify a pod's service account identity?

The Secret that contains the service account token mounted into the pod.

What is the main security benefit of Network Policies?

They restrict pod-to-pod communication based on rules, limiting lateral movement in case of a breach.

Which component validates and enforces resource quotas?

Admission Controller, which checks resource quota rules before persisting objects to etcd.

What is a recommended practice for managing RBAC permissions?

Use RoleBindings and ClusterRoleBindings to grant specific permissions following least privilege.

What helps protect API server access from unauthorized clients?

Using Transport Layer Security (TLS) for all API communications to encrypt and authenticate the server.

What does a Kubernetes Ingress resource manage?

HTTP and HTTPS routing to services within the cluster, with rules for hostnames, paths, and TLS termination.

Which strategy reduces the impact of node failures?

Spreading replicas across multiple nodes and zones to ensure workload availability during failures.

What is the purpose of a Readiness Probe?

To determine when a container is ready to serve traffic; if it fails, the pod is removed from service endpoints.

Which control plane component maintains the desired cluster state?

The controller manager, which runs control loops to adjust the current state to match the desired state.

What mechanism prevents a container from gaining more privileges than its entry point?

Setting allowPrivilegeEscalation to false in the security context.

What is the default type of Kubernetes Service?

ClusterIP, which gives a stable internal IP accessible only from within the cluster.

What does a ServiceAccount token provide?

An identity for the pod to authenticate to the Kubernetes API server, stored in a Secret.

How do you enable TLS for API server communications?

By configuring the API server with a TLS certificate and key, and using HTTPS for all client connections.

What is the effect of not having any Network Policy defined?

All pod-to-pod traffic is allowed by default, with no restrictions on communication.

What does the allowPrivilegeEscalation field control?

It prevents a process from gaining more privileges than its parent, enforcing least privilege at the container level.

Active recall deck

Practice Kubernetes and Cloud Security Associate with real flashcards

Read the prompt, commit to an answer, then flip the card. Move through the deck at your own pace and repeat any topic that does not come back quickly.

20 free cards

Card 1 of 20

1 reviewed this session

Connect the concepts

Your Kubernetes and Cloud Security Associate study mind map

Open a branch to connect a topic with its practice questions and explanations. Use the map to choose your next review topic.

Kubernetes and Cloud Security Associate15 questions in this practice set
Understand core Kubernetes object organization concepts(1)
Differentiate between configuration and secret storage mechanisms(1)
Understand Kubernetes service networking models(1)
Apply security controls for image deployment(1)
Apply Kubernetes security contexts and pod standards(1)
Understand service account authentication mechanisms(1)
Implement network segmentation using Kubernetes policies(1)
Understand admission control mechanisms in API server flow(1)
Apply role-based access control best practices(1)
Secure API server communications and access(1)
Understand ingress networking and routing concepts(1)
Design resilient cluster architectures(1)
More practice connections(3)
Exam-focused analysis

What this KCSA practice set measures

This is an analysis of the practice bank, not a claim about the vendor's live exam blueprint. Use it to identify the knowledge, judgment, and recall patterns exercised here, then verify your coverage against the current official exam guide.

Understanding Kubernetes Namespace and Resource Organization

The practice bank emphasizes that Namespaces provide logical separation for multi-tenant clusters, but they do not offer strong isolation on their own. Questions test the ability to distinguish between default service behaviors (ClusterIP) and external access patterns (Ingress). ConfigMaps and Secrets are correctly identified for non-sensitive and sensitive data respectively, highlighting the importance of proper data classification. Understanding these basics is critical for organizing cluster resources securely.

  • Namespaces partition cluster resources and scope objects for different teams or projects.
  • ConfigMaps store non-confidential configuration data like environment variables.
  • ClusterIP Services expose workloads only within the cluster.
  • Ingress manages external HTTP/HTTPS routing to Services.

Securing Container Images and Pod Configuration

A key security practice tested is controlling which images can run in the cluster. The correct answer uses an admission controller with image policy checks, which validates images against a registry whitelist or signature requirements. Pod Security Standards are also featured, particularly the 'restricted' profile that enforces least privilege by disallowing privilege escalation and limiting capabilities. These mechanisms help prevent the deployment of malicious or misconfigured containers.

  • Admission controllers enforce image policy checks to approve only permitted images.
  • The 'restricted' Pod Security Standard disallows privilege escalation and restricts Linux capabilities.
  • AllowPrivilegeEscalation set to false prevents a container from gaining more privileges than its entry point.

Network Security and Access Control

Network Policies are identified as the primary tool for restricting pod-to-pod communication, thereby limiting lateral movement in case of a compromise. RBAC best practices are reinforced by recommending RoleBindings and ClusterRoleBindings with least privilege rather than broad admin rights. The importance of TLS for protecting API server communications is also highlighted, ensuring that unauthorized clients cannot intercept or tamper with traffic.

  • Network Policies restrict communication between pod endpoints based on defined rules.
  • RoleBindings and ClusterRoleBindings grant specific permissions following least privilege.
  • TLS encryption protects all API server communications from unauthorized access.

Cluster Resilience and Control Plane Components

High availability is addressed by recommending that replicas be spread across multiple nodes and zones to reduce the impact of node failures. Readiness Probes are correctly associated with indicating when a container is ready to serve traffic, while the controller manager is identified as the component responsible for maintaining the desired cluster state. Service account tokens stored in Secrets allow verification of pod identity, which is crucial for auditing and access control.

  • Spreading replicas across multiple nodes and zones ensures workload availability during failures.
  • Readiness Probes signal when a container is ready to accept traffic.
  • The controller manager runs control loops to maintain the desired cluster state.
  • Service account tokens are stored in Secrets mounted into pods.

Study workflow

Turn one KCSA attempt into a study plan

  1. 1

    Review Namespace and Resource Basics

    Create two test Namespaces (e.g., dev and prod). Deploy a simple ConfigMap in each. Use kubectl get namespaces and kubectl describe configmap to verify isolation. Then test ClusterIP Service connectivity by running a temporary pod and curl to the service IP.

  2. 2

    Practice Admission Control Policies

    Enable the PodSecurity admission controller in a test cluster. Define a Policy that enforces the 'restricted' profile. Attempt to create a pod with privileged: true or hostPID: true to see the denial. Also test image policy checks by setting up an ImagePolicyWebhook with a whitelist of approved registries.

  3. 3

    Implement Network Policies

    Deploy two sets of pods (frontend and backend) with labels. Create a NetworkPolicy that allows only frontend to backend traffic on port 80. Use curl from a frontend pod to verify success, and from a backend pod to verify denial. Test ingress and egress rules separately.

  4. 4

    Configure RBAC with Least Privilege

    Create a service account for a CI/CD pipeline. Define a Role that grants only get and list on pods and deployments. Bind the Role to the SA in a specific Namespace. Test by using the SA's token to access the API. Then try a forbidden action like delete to confirm denial.

  5. 5

    Simulate Node Failure and Probes

    Deploy a deployment with 3 replicas. Add a ReadinessProbe that checks a file. On one node, cordon and drain it. Observe that pods are rescheduled to other nodes. Then simulate a failing ReadinessProbe by removing the file; confirm the pod is removed from service endpoints.

FAQ

Questions about this KCSA practice page

Clear boundaries on what the bank covers, how to use it, and where official vendor information still matters.

What is the difference between a ConfigMap and a Secret?+

ConfigMaps store non-confidential data like configuration files or environment variables. Secrets store sensitive data such as passwords or tokens and are base64 encoded but not automatically encrypted at rest. For true encryption, use an encryption provider or external secret management.

How does a Network Policy enhance security in Kubernetes?+

Network Policies implement micro-segmentation by controlling ingress and egress traffic between pods. They limit lateral movement if a pod is compromised, reducing the blast radius. Without a policy, all pod-to-pod traffic is allowed by default.

What is the purpose of the 'restricted' Pod Security Standard?+

The restricted profile enforces strict security defaults, including disallowing privilege escalation, dropping all capabilities except those required, and preventing the use of host namespaces. It is designed for production workloads where security is paramount.

How can I verify the identity of a service account used by a pod?+

Each pod has a projected service account token mounted as a volume. You can inspect the associated Secret (or TokenRequest) using kubectl describe secret or kubectl get token. The token's payload contains the service account name and expiration.

What does the controller manager do in a Kubernetes cluster?+

The controller manager runs controllers that regulate the cluster state, such as the replication controller, node controller, and endpoints controller. Each controller watches the API server for differences between desired and current state and makes corrective changes (e.g., creating pods if replicas are down).

Keep studying

Build the next review session

Browse another free bank or use the study strategy guide to turn your misses into spaced review.