




































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A set of questions and answers related to the kubernetes and cloud native associate exam. It covers key concepts such as pods, replicasets, deployments, services, and network policies. The questions are designed to test understanding of kubernetes architecture, components, and functionalities, providing valuable practice for exam preparation. Each question includes a detailed explanation of the correct answer, enhancing learning and comprehension of kubernetes principles. This resource is ideal for individuals preparing for the kubernetes certification exam.
Typology: Exams
1 / 76
This page cannot be seen from the preview
Don't miss anything!





































































Question 1. What is the primary purpose of a Kubernetes Pod? A) To serve as the smallest deployable unit that can be created, scheduled, and managed in Kubernetes B) To manage load balancing across multiple services C) To provide persistent storage for applications D) To define network policies between containers Answer: A Explanation: A Pod is the smallest and simplest unit in the Kubernetes object model that represents a single instance of a running process in your cluster, encapsulating one or more containers. Question 2. Which Kubernetes resource is responsible for maintaining a specified number of pod replicas? A) Deployment B) ReplicaSet C) StatefulSet D) DaemonSet Answer: B Explanation: ReplicaSet ensures that a specified number of pod replicas are running at any given time. Deployments manage ReplicaSets but directly control pod replicas. Question 3. What is the main role of the Kubernetes Control Plane? A) To manage the worker nodes and run containerized applications B) To provide networking between pods C) To handle the cluster's overall orchestration and management functions D) To store persistent data for applications Answer: C Explanation: The Control Plane manages the Kubernetes cluster, including scheduling, maintaining desired states, and handling API requests. Question 4. Which component of the Kubernetes architecture is responsible for scheduling Pods onto nodes?
A) kube-apiserver B) kube-scheduler C) kube-controller-manager D) kubelet Answer: B Explanation: The kube-scheduler assigns Pods to nodes based on resource availability and constraints. Question 5. How does the Kubernetes API server interact with other components? A) It directly manages container runtimes B) It acts as the central hub for all REST commands and cluster state management C) It only handles security policies D) It manages network traffic between pods Answer: B Explanation: The API server is the main communication point for all cluster components and external users, handling REST requests and maintaining cluster state. Question 6. What is a key difference between containers and virtual machines? A) Containers provide full OS virtualization, while VMs do not B) Containers share the host OS kernel, while VMs run separate OS instances C) Containers are slower to start than VMs D) Containers do not support resource isolation Answer: B Explanation: Containers share the host OS kernel and are lightweight, whereas VMs run separate OS instances, providing stronger isolation but at higher resource cost. Question 7. Which Kubernetes resource provides a way to expose an application running inside a Pod to external traffic? A) ConfigMap B) Service C) PersistentVolume
Explanation: PersistentVolumes provide a way to allocate and manage storage outside of Pod lifecycle, enabling data persistence across Pod restarts. Question 11. Which Kubernetes object manages rolling updates and rollbacks for application deployments? A) ReplicaSet B) Deployment C) StatefulSet D) DaemonSet Answer: B Explanation: Deployments manage the rollout of updates, allowing for rolling updates and rollbacks to previous versions if needed. Question 12. In Kubernetes, what is the main purpose of a StatefulSet? A) To manage stateless, scalable applications with unique network identities and stable storage B) To run daemon containers on all nodes C) To manage batch jobs D) To expose Pods externally through load balancers Answer: A Explanation: StatefulSets are designed for stateful applications requiring stable network identities, persistent storage, and ordered deployment. Question 13. Which component of Kubernetes is responsible for maintaining the desired state of nodes and pods? A) kube-apiserver B) kube-controller-manager C) kube-scheduler D) kubelet Answer: B Explanation: The kube-controller-manager runs controllers that ensure the current state matches the desired state, such as managing node health and replica counts.
Question 14. How does Kubernetes achieve network communication between Pods? A) Via shared storage volumes B) Using container port mappings only within the same node C) Through a flat network where each Pod has its own IP address, enabling direct communication D) By routing all traffic through the API server Answer: C Explanation: Kubernetes assigns each Pod a unique IP address, allowing direct communication across the cluster without NAT or port mappings. Question 15. What security feature in Kubernetes enforces which users or service accounts can perform actions on resources? A) Network Policies B) Role-Based Access Control (RBAC) C) Pod Security Standards D) Secrets Answer: B Explanation: RBAC controls permissions and enforces security policies by defining roles and assigning them to users or service accounts. Question 16. Which component of the Kubernetes control plane is responsible for managing the cluster’s overall state and health? A) kube-apiserver B) kube-controller-manager C) kube-scheduler D) kubelet Answer: B Explanation: The kube-controller-manager runs controllers that monitor the cluster’s state and make necessary adjustments to maintain desired configurations.
A) By restricting Pod-to-Pod communication based on rules B) By encrypting all network traffic C) By managing ingress and egress traffic at the load balancer level D) By controlling access to the Kubernetes API server Answer: A Explanation: Network Policies define rules that specify which Pods can communicate with each other, enhancing network security within the cluster. Question 21. What is the primary function of a Service Mesh in a Kubernetes environment? A) To provide persistent storage for stateful applications B) To manage secure, reliable, and observable communication between microservices C) To orchestrate container deployment workflows D) To replace the Kubernetes network layer entirely Answer: B Explanation: Service Mesh handles service-to-service communication, providing features like load balancing, security, and observability. Question 22. Which storage type provides persistent storage that can be dynamically provisioned in Kubernetes? A) ConfigMap B) PersistentVolumeClaim C) Secret D) PodSecurityPolicy Answer: B Explanation: PersistentVolumeClaims request storage resources that are dynamically provisioned or pre- existing, enabling persistent data storage. Question 23. What is the primary benefit of using container runtimes like containerd or CRI-O with Kubernetes? A) To provide a graphical user interface for container management
B) To execute and manage containers within the cluster efficiently and securely C) To replace Kubernetes’ control plane components D) To manage network traffic between containers Answer: B Explanation: Container runtimes are responsible for running containers, providing the environment needed for containerized applications within Kubernetes. Question 24. How does Kubernetes facilitate application scaling? A) By manually copying containers on different nodes B) Through Horizontal Pod Autoscaler, which automatically adjusts the number of pods based on metrics C) By increasing the size of existing containers D) By restarting Pods periodically Answer: B Explanation: Horizontal Pod Autoscaler automatically scales the number of Pods based on CPU utilization or custom metrics, enabling dynamic scaling. Question 25. What is a key characteristic of a DaemonSet? A) It manages stateless applications only B) It ensures that a copy of a Pod runs on all or selected nodes in the cluster C) It is used for batch jobs that run once D) It manages persistent storage volumes Answer: B Explanation: DaemonSets run a copy of a Pod on all nodes or specific nodes, often used for node-level services like log collection or monitoring. Question 26. Which resource type is used to store sensitive information such as passwords or tokens in Kubernetes? A) ConfigMap B) Secret C) PersistentVolumeClaim
Explanation: The Node Controller monitors node health and reschedules Pods from failed nodes to healthy ones to maintain desired state. Question 30. What is the purpose of a Horizontal Pod Autoscaler? A) To manually increase or decrease the number of Pods B) To automatically scale Pods based on resource utilization or custom metrics C) To manage persistent storage for Pods D) To schedule Pods across different regions Answer: B Explanation: The Horizontal Pod Autoscaler automatically adjusts the number of Pods in response to observed metrics, enabling dynamic scaling. Question 31. Which command-line tool is primarily used to interact with the Kubernetes API? A) kubectl B) docker C) helm D) kubeadm Answer: A Explanation: kubectl is the command-line tool used to deploy, manage, and troubleshoot Kubernetes resources via the API server. Question 32. What is the role of the kube-proxy in Kubernetes? A) To schedule Pods on nodes B) To manage network communication and load balancing for services C) To run containers on each node D) To store persistent data Answer: B Explanation: kube-proxy manages network rules and load balancing for Services, enabling network communication between Pods and external clients.
Question 33. Which feature allows Kubernetes to run a containerized application at specified intervals or times? A) CronJob B) Deployment C) DaemonSet D) StatefulSet Answer: A Explanation: CronJobs schedule and run Pods periodically based on a specified schedule, similar to cron in Unix/Linux systems. Question 34. How does Kubernetes support multi-tenancy and isolated environments? A) Using namespaces to logically isolate resources and workloads B) By creating separate clusters for each tenant C) Through network policies only D) By deploying different versions of Kubernetes for each tenant Answer: A Explanation: Namespaces provide a logical separation of resources within a single cluster, enabling multi-tenancy and resource isolation. Question 35. Which component of Kubernetes provides a REST API that serves as the front end for all cluster interactions? A) kube-scheduler B) kube-controller-manager C) kube-apiserver D) kubelet Answer: C Explanation: The kube-apiserver exposes the Kubernetes API, handling all REST requests for cluster management and resource operations. Question 36. What is the primary purpose of a PersistentVolumeClaim?
C) By authenticating users accessing the API server D) By managing persistent volumes Answer: B Explanation: Network Policies specify allowed traffic flows between pods, improving security by isolating sensitive workloads. Question 40. Which resource is used to define a set of policies for running containers securely in Kubernetes? A) SecurityContext B) PodSecurityPolicy (deprecated) / Pod Security Standards C) RoleBinding D) NetworkPolicy Answer: B Explanation: Pod Security Standards define security policies for pods, controlling permissions and security context to ensure secure container runtime environments. Question 41. What is the main function of the kube-controller-manager? A) It runs controllers that regulate the state of the cluster, such as node and replication controllers B) It schedules Pods onto nodes C) It manages network traffic for services D) It handles API requests from users and tools Answer: A Explanation: The kube-controller-manager runs various controllers to maintain the desired state of the cluster, such as ensuring the correct number of replicas. Question 42. How does a Service in Kubernetes help in load balancing? A) It distributes incoming network traffic across multiple Pods to ensure high availability and reliability B) It manages persistent storage for Pods C) It schedules Pods onto nodes based on resource availability D) It provides security policies between Pods
Answer: A Explanation: Services abstract a set of Pods and load balance network traffic to them, ensuring even distribution and high availability. Question 43. What is the purpose of the kube-scheduler? A) To run cluster control loops and manage cluster state B) To assign Pods to nodes based on resource constraints and policies C) To execute container images on nodes D) To secure cluster communications Answer: B Explanation: The kube-scheduler assigns Pods to suitable nodes considering resource requirements, constraints, and policies. Question 44. Which component manages container lifecycle and communicates with the container runtime on each node? A) kube-apiserver B) kubelet C) kube-scheduler D) kube-proxy Answer: B Explanation: The kubelet manages containers on a node, ensuring they are running as specified and communicating with the API server. Question 45. How do Pod Security Standards improve security in Kubernetes? A) By providing guidelines and policies to restrict the capabilities and permissions of Pods B) By encrypting all network connections by default C) By controlling user access to the API server D) By managing persistent storage encryption Answer: A
Question 49. How does Kubernetes support multi-cloud or hybrid cloud deployments? A) By deploying multiple clusters and managing them via federation or multi-cluster management tools B) Using only local storage options C) Through dedicated hardware only D) By restricting network access to specific clouds Answer: A Explanation: Kubernetes can manage multiple clusters across different clouds or on-premises environments, enabling multi-cloud strategies. Question 50. What is a key benefit of using Helm in Kubernetes? A) To manage complex application deployments with templating and versioning B) To replace the Kubernetes API server C) To handle network policies automatically D) To provide persistent storage solutions Answer: A Explanation: Helm is a package manager that simplifies deploying, upgrading, and managing complex applications via charts with templated configurations. Question 51. Which component of Kubernetes is responsible for maintaining the desired number of Pod replicas? A) Deployment B) ReplicaSet C) StatefulSet D) DaemonSet Answer: B Explanation: ReplicaSet ensures that a specified number of pod replicas are running at any given time and is managed by Deployments for declarative updates. Question 52. What is the main purpose of a Kubernetes Deployment?
A) To run batch jobs only once B) To provide an easy way to create, update, and roll back ReplicaSets and Pods C) To manage persistent volumes D) To expose services externally Answer: B Explanation: Deployments provide declarative updates for Pods and ReplicaSets, enabling rolling updates and rollbacks. Question 53. How does the Kubernetes scheduler determine which node to place a Pod on? A) Random selection B) Based on resource availability, constraints, and policies such as node affinity and taints C) Always on the master node D) Based solely on the node with the least number of Pods Answer: B Explanation: The scheduler considers resource requirements, node labels, taints, tolerations, and constraints to choose the most suitable node. Question 54. Which object in Kubernetes is used to expose an application running inside a Pod externally? A) Ingress B) Service C) ConfigMap D) PersistentVolumeClaim Answer: B Explanation: Service creates an abstraction over a set of Pods to provide network access, load balancing, and service discovery. Question 55. What is the purpose of the kubelet process on each node? A) To schedule Pods onto nodes
D) To secure communication between Pods Answer: B Explanation: Kube-proxy maintains network rules on nodes, enabling service discovery and load balancing for network traffic. Question 59. Which feature in Kubernetes allows for automatic scaling of Pods based on CPU or custom metrics? A) Horizontal Pod Autoscaler (HPA) B) Vertical Pod Autoscaler (VPA) C) Cluster Autoscaler D) Deployment Controller Answer: A Explanation: HPA automatically adjusts the number of Pods based on observed metrics, supporting dynamic scaling. Question 60. How can namespace isolation benefit a Kubernetes cluster? A) By improving network performance B) By logically grouping resources for multi-tenancy and access control C) By increasing storage capacity D) By providing hardware-level isolation Answer: B Explanation: Namespaces partition resources and enable multi-tenancy, access control, and organizational separation within a single cluster. Question 61. Which Kubernetes object is best suited for managing a set of stateless, horizontally scalable applications? A) Deployment B) StatefulSet C) DaemonSet D) Job
Answer: A Explanation: Deployments are designed for stateless applications that require scalable, rolling updates, and easy management. Question 62. What is the primary purpose of a DaemonSet? A) To run a copy of a Pod on every node or selected nodes, often for node-level services like log collection or monitoring B) To manage batch jobs that run once C) To provide persistent storage for applications D) To expose services externally Answer: A Explanation: DaemonSets ensure that specific Pods run on all or selected nodes, typically for system- level tasks or services. Question 63. How does Kubernetes support multi-cloud deployments? A) By deploying multiple clusters and managing them with federation or multi-cluster management tools B) Using only local storage options C) Through dedicated hardware only D) By restricting network access to specific clouds Answer: A Explanation: Kubernetes can manage multiple clusters across different cloud providers, enabling hybrid and multi-cloud strategies with tools like federation. Question 64. What is the benefit of Helm in Kubernetes? A) To manage complex application deployments with templating, versioning, and easy upgrades B) To replace the Kubernetes API server C) To automatically configure network policies D) To provide persistent storage solutions Answer: A