Kubernetes Case Studies: Deploy & Troubleshoot Apps certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Kubernetes Case Studies: Deploy & Troubleshoot Apps exam and earn Kubernetes Case Studies: Deploy & Troubleshoot Apps certificate.
Table of Contents
- Question 1
- Answer
- Explanation
- Question 2
- Answer
- Explanation
- Question 3
- Answer
- Explanation
- Question 4
- Answer
- Explanation
- Question 5
- Answer
- Explanation
- Question 6
- Answer
- Explanation
- Question 7
- Answer
- Explanation
- Question 8
- Answer
- Explanation
- Question 9
- Answer
- Explanation
- Question 10
- Answer
- Explanation
- Question 11
- Answer
- Explanation
- Question 12
- Answer
- Explanation
- Question 13
- Answer
- Explanation
- Question 14
- Answer
- Explanation
- Question 15
- Answer
- Explanation
- Question 16
- Answer
- Explanation
- Question 17
- Answer
- Explanation
- Question 18
- Answer
- Explanation
- Question 19
- Answer
- Explanation
Question 1
Which best describes the overall purpose of this Kubernetes case study project?
A. Building a machine learning model in Kubernetes
B. Creating a CI/CD pipeline for testing
C. Hosting a web application as a container inside Kubernetes
D. Configuring a database-only environment
Answer
C. Hosting a web application as a container inside Kubernetes
Explanation
The project demonstrates deploying a containerized app on Kubernetes. The project focuses on deploying, managing, and troubleshooting a web application running as a container within a Kubernetes environment. It emphasizes understanding how applications operate inside pods, how services expose them, and how cluster behavior affects availability, making application hosting the central objective.
Question 2
Why is it important to install Kubernetes on multiple virtual machines rather than a single VM?
A. To demonstrate master–worker cluster functionality
B. To reduce installation complexity
C. To avoid using Docker images
D. To save disk space
Answer
A. To demonstrate master–worker cluster functionality
Explanation
Kubernetes requires multiple nodes to simulate real clusters. Using multiple virtual machines allows the environment to replicate real Kubernetes cluster behavior, where the control plane runs on the master node and workloads run on worker nodes. This separation is essential for demonstrating scheduling, pod distribution, failover behavior, and communication between cluster components.
Question 3
Which operating system was chosen for the Kubernetes nodes in this project?
A. Ubuntu Linux
B. CentOS Linux
C. macOS
D. Windows Server
Answer
A. Ubuntu Linux
Explanation
The project uses Ubuntu-based master and worker nodes. Ubuntu Linux provides strong compatibility, an active community, and well-maintained Kubernetes packages, making it suitable for cluster setup. Its stability and package support simplify kubeadm installation steps and reduce configuration friction across master and worker nodes.
Question 4
Which command generates the token required for worker nodes to join the cluster?
A. helm install
B. kubectl join
C. docker swarm join
D. kubeadm token create –print-join-command
Answer
D. kubeadm token create –print-join-command
Explanation
This generates the join command for worker nodes. This command outputs the full join string that worker nodes must execute to register with the control plane. It bundles the token, CA hash, and API server address, ensuring workers securely authenticate during the join process.
Question 5
What happens if a node is drained in Kubernetes?
A. Secrets are removed from the node
B. The node is permanently deleted from the cluster
C. Pods are safely evicted, and the node is marked unschedulable
D. The node immediately reboots
Answer
C. Pods are safely evicted, and the node is marked unschedulable
Explanation
Draining prepares the node for maintenance. Draining ensures workloads migrate gracefully to other nodes by evicting running pods without abrupt termination. The node is prevented from receiving new pods, allowing safe maintenance while maintaining application availability.
Question 6
Why is cluster initialization performed only on the master node?
A. To configure container images on workers
B. Because the master controls the cluster state and API server
C. To improve pod networking only
D. To restart system services
Answer
B. Because the master controls the cluster state and API server
Explanation
The master node initializes and manages the cluster. Initialization configures the core control-plane components that manage cluster state, scheduling decisions, and API handling. These responsibilities belong exclusively to the master node, so workers do not run initialization and instead join the completed control plane.
Question 7
Which command validates whether nodes have successfully joined the cluster?
A. kubectl get nodes
B. kubectl get services
C. docker ps
D. kubectl logs
Answer
A. kubectl get nodes
Explanation
Lists nodes and readiness status. This command queries the API server and returns all registered nodes along with their readiness status. It confirms whether worker nodes have successfully joined and are prepared to run workloads.
Question 8
Node selectors in Kubernetes are based on which concept?
A. Pod replica counts
B. RBAC roles
C. Node labels
D. Storage class definitions
Answer
C. Node labels
Explanation
Node selectors match pods to nodes with specific labels. Node selectors match pods to nodes using predefined key-value labels applied to nodes. Pods specify selectors that must match these labels, enabling basic placement control for routing workloads to specific node types.
Question 9
What advantage does Node Affinity provide over Node Selector?
A. It reduces cluster installation time
B. It allows flexible rules with required and preferred conditions
C. It automatically assigns pods to all worker nodes
D. It enforces RBAC restrictions
Answer
B. It allows flexible rules with required and preferred conditions
Explanation
Node Affinity provides soft and hard placement rules. Node Affinity extends basic selectors by supporting soft (preferred) and hard (required) constraints. This provides more expressive scheduling logic that allows Kubernetes to influence pod placement strategies without limiting scheduling options to strict matches only.
Question 10
Which component ensures pods are scheduled on nodes with available resources?
A. Scheduler
B. Controller Manager
C. Etcd
D. API Server
Answer
A. Scheduler
Explanation
The scheduler assigns pods to nodes. The scheduler evaluates resource availability, constraints, affinity rules, and other placement factors before assigning pods to nodes. It ensures each pod lands on a node capable of meeting its CPU, memory, and configuration requirements.
Question 11
What is the purpose of the kubelet service on worker nodes?
A. To configure RBAC rules
B. To communicate with the master and manage pod execution
C. To handle network load balancing
D. To store container images
Answer
B. To communicate with the master and manage pod execution
Explanation
Kubelet runs pods and interacts with the control plane. The kubelet runs on each node and ensures containers described in the pod specifications are running and healthy. It communicates with the control plane, reports node status, and orchestrates pod lifecycle operations on the worker node.
Question 12
Which Kubernetes command verifies that nodes are ready after joining the cluster?
A. kubectl cluster-info
B. kubectl get nodes
C. kubectl config view
D. kubectl get secrets
Answer
B. kubectl get nodes
Explanation
Shows node status. This command checks node states such as Ready, NotReady, or Unknown, confirming whether new nodes are operational. It provides a clear view of cluster membership and health as workers register and become schedulable.
Question 13
Why is draining a node before maintenance recommended?
A. To permanently remove the node
B. To generate certificates for pods
C. To safely evict workloads and prevent new pods from being scheduled
D. To restart etcd services
Answer
C. To safely evict workloads and prevent new pods from being scheduled
Explanation
Draining prepares the node for maintenance. Draining ensures workloads relocate cleanly to healthy nodes without service disruption. Marking the node unschedulable avoids new pod assignments, enabling controlled maintenance without interrupting running applications.
Question 14
Which option best describes a Kubernetes cluster?
A. A set of Docker containers on a single machine
B. A storage volume attached to a pod
C. A set of monitoring dashboards
D. A group of master and worker nodes managed by Kubernetes control plane
Answer
D. A group of master and worker nodes managed by Kubernetes control plane
Explanation
A cluster involves multiple nodes. A cluster consists of control-plane nodes that maintain state and worker nodes that run workloads. This architecture enables distributed container orchestration, high availability, and efficient workload management across resources.
Question 15
Which file format is primarily used for Kubernetes configuration?
A. INI
B. YAML
C. JSON only
D. TXT
Answer
B. YAML
Explanation
YAML is the most common format for configs. Kubernetes uses YAML manifests to declare resources such as pods, deployments, and services. The format is human-readable, supports nested structures, and aligns with Kubernetes’ declarative configuration model.
Question 16
What does setting a node as “unschedulable” do?
A. Prevents new pods from being scheduled
B. Deletes all workloads on the node
C. Restarts kubelet service
D. Adds more CPU automatically
Answer
A. Prevents new pods from being scheduled
Explanation
Unschedulable blocks new workloads. Marking a node unschedulable stops new workload placements while allowing existing pods to continue running unless explicitly evicted. This is used during maintenance or workload control scenarios.
Question 17
What is the difference between Node Selector and Node Affinity?
A. Node Selector secures API requests
B. Node Selector is more advanced
C. Node Affinity allows preferred and required rules, Node Selector is basic
D. Both provide identical scheduling rules
Answer
C. Node Affinity allows preferred and required rules, Node Selector is basic
Explanation
Node Affinity is more flexible. Node Selector offers exact label matching, while Node Affinity supports expressive scheduling rules such as soft preferences and complex constraints. This makes Node Affinity more adaptable for advanced placement policies.
Question 18
Why are resource requests important when scheduling pods?
A. They create namespaces automatically
B. They prevent RBAC conflicts
C. They guarantee pods receive minimum CPU/memory
D. They expose services externally
Answer
C. They guarantee pods receive minimum CPU/memory
Explanation
Requests ensure minimum resources. Resource requests inform the scheduler of the baseline resources a pod requires. They prevent over-commitment by ensuring the pod is scheduled only on nodes that can provide its needed CPU and memory, maintaining performance stability.
Question 19
Which tool is used to initialize a Kubernetes cluster?
A. Kubectl
B. Kubeadm
C. Docker Compose
D. Helm
Answer
B. Kubeadm
Explanation
Kubeadm initializes clusters. Kubeadm automates bootstrapping of Kubernetes clusters by configuring the control plane and generating join tokens for workers. It streamlines the setup process while adhering to Kubernetes best practices for production-grade initialization.