Module 1 Quiz - Introduction to Kubernetes
Instructions
This quiz contains 30 multiple-choice questions to validate your understanding of Module 1.
Tip: Answer each question before revealing the answer. The answers are hidden just after each question.
Question 1
What is Kubernetes?
See explanation
Correct answer: A container orchestration platform that automates the deployment, scaling, and management of containerized applications
Explanation: Kubernetes (K8s) is an open-source platform that orchestrates containers. It does not replace the operating system but rather manages the deployment and execution of containers across multiple machines.
Question 2
Why is Kubernetes abbreviated as "K8s"?
See explanation
Correct answer: Because there are 8 letters between the "K" and the "s" in "Kubernetes"
Explanation: Kubernetes = K + 8 letters (ubernete) + s = K8s. It's a common abbreviation in computing.
Question 3
What is the main advantage of Kubernetes over manual container management?
See explanation
Correct answer: It automates orchestration, scaling, self-healing, and lifecycle management of applications
Explanation: Kubernetes automates many tasks that would be tedious to do manually: deployment, restart in case of failure, scaling according to load, load balancing, etc.
Question 4
What are the two main types of machines in a Kubernetes cluster?
See explanation
Correct answer: Control Plane (Master) and Worker Nodes
Explanation: The Control Plane (formerly called Master) manages the cluster and makes decisions. The Worker Nodes run the applications (Pods).
Question 5
Which component of the Control Plane stores the cluster state?
See explanation
Correct answer: etcd
Explanation: etcd is the distributed database that stores all the configuration and state of the Kubernetes cluster. It is the single source of truth.
Question 6
What is a Pod in Kubernetes?
See explanation
Correct answer: The smallest deployable unit in Kubernetes, containing one or more containers that share resources
Explanation: A Pod is a group of one or more containers that share the same IP address, volumes, and network namespace. It is the atomic unit of deployment.
Question 7
What is the main role of a Deployment in Kubernetes?
See explanation
Correct answer: Manage the lifecycle of Pods, including replicas, updates, and rollbacks
Explanation: A Deployment describes the desired state of your application (number of replicas, Docker image, etc.) and automatically manages the Pods to maintain that state. It also allows rolling updates and rollbacks.
Question 8
Which type of Service exposes an application on a port of each node in the cluster?
See explanation
Correct answer: NodePort
Explanation: A NodePort Service exposes the application on a specific port (30000-32767) of each node in the cluster, allowing access from outside the cluster.
Question 9
Which company created Kubernetes and on which internal system was it based?
See explanation
Correct answer: Google, based on Borg (Google's internal system)
Explanation: Kubernetes was created by Google in 2014, inspired by their internal system Borg which managed millions of containers since 2003. Kubernetes is the open-source version of this experience.
Question 10
What is the main advantage of multi-cloud portability with Kubernetes?
See explanation
Correct answer: Avoiding vendor lock-in and being able to easily migrate between different cloud providers
Explanation: Kubernetes works the same way on AWS, Azure, GCP, on-premise, etc. This allows you not to be tied to a single provider and to migrate your applications easily.
Question 11
Which component of the Control Plane is the entry point for all interactions with the cluster?
See explanation
Correct answer: API Server
Explanation: The API Server is the only component with which users and other components of the cluster interact directly. It exposes the Kubernetes REST API and validates all requests.
Question 12
What is a Namespace in Kubernetes?
See explanation
Correct answer: A logical isolation mechanism that allows dividing a cluster into multiple virtual environments
Explanation: Namespaces allow organizing resources in a cluster and creating separate environments (development, staging, production) without needing separate clusters.
Question 13
What is the role of the Scheduler in Kubernetes?
See explanation
Correct answer: Assign Pods to Worker Nodes based on available resources
Explanation: The Scheduler monitors newly created Pods and assigns them to appropriate nodes based on resource constraints, affinities, and anti-affinities defined.
Question 14
What is the name of the official command-line tool to interact with Kubernetes?
See explanation
Correct answer: kubectl
Explanation: kubectl (pronounced "kube-control") is the official command-line tool to interact with a Kubernetes cluster. It allows creating, modifying, deleting, and inspecting resources.
Question 15
What is self-healing in Kubernetes?
See explanation
Correct answer: The ability of Kubernetes to automatically restart containers that crash or replace failing Pods
Explanation: Kubernetes constantly monitors the state of Pods. If a container crashes or a Pod no longer responds to health checks, Kubernetes automatically restarts it or creates a new Pod to replace it.
Question 16
Which type of Service is used by default in Kubernetes and is only accessible from within the cluster?
See explanation
Correct answer: ClusterIP
Explanation: ClusterIP is the default Service type. It exposes the Service on an internal IP of the cluster, accessible only from within the cluster. It is ideal for inter-service communication.
Question 17
Which component runs on each Worker Node and manages the Pods on that node?
See explanation
Correct answer: kubelet
Explanation: The kubelet is the agent that runs on each Worker Node. It communicates with the API Server and manages the Pods on its node: starting, stopping, health checks, etc.
Question 18
What is a Rolling Update in Kubernetes?
See explanation
Correct answer: An update strategy that gradually replaces old Pods with new ones, without service interruption
Explanation: Rolling Updates allow updating an application without downtime. Kubernetes gradually creates new Pods with the new version and deletes the old ones, always maintaining a minimum number of available Pods.
Question 19
Which organization currently manages Kubernetes?
See explanation
Correct answer: CNCF (Cloud Native Computing Foundation)
Explanation: Google donated Kubernetes to the CNCF in 2015 to ensure neutral governance and industry-wide adoption. The CNCF is part of the Linux Foundation.
Question 20
What is the main advantage of auto-scaling in Kubernetes?
See explanation
Correct answer: Automatic adjustment of the number of Pods according to load, optimizing resources and ensuring performance
Explanation: Auto-scaling (Horizontal Pod Autoscaler) monitors metrics (CPU, memory, etc.) and automatically adjusts the number of replicas to meet demand, avoiding overload or resource waste.
Question 21
What is the role of kube-proxy on a Worker Node?
See explanation
Correct answer: Maintain network rules and manage network communication to Services
Explanation: kube-proxy runs on each node and maintains the network rules that allow communication with Services. It performs load balancing and routing of traffic to backend Pods.
Question 22
Which tool allows creating a local Kubernetes cluster in a virtual machine?
See explanation
Correct answer: minikube
Explanation: minikube creates a single-node Kubernetes cluster in a virtual machine, ideal for local development and learning. kind is an alternative that uses Docker instead of a VM.
Question 23
Which kubectl command allows creating resources from a YAML file?
See explanation
Correct answer: kubectl apply -f
Explanation: kubectl apply -f file.yaml creates or updates resources from a YAML file. It is the recommended method because it is declarative and idempotent.
Question 24
What is the main advantage of Kubernetes for microservices?
See explanation
Correct answer: Automated management of deployment, scaling, and communication between different services
Explanation: Kubernetes excels in managing microservices architectures by automating the deployment of each service, their independent scaling, service discovery, and communication between them.
Question 25
Which component of the Control Plane makes decisions about the desired state of the cluster?
See explanation
Correct answer: Controller Manager
Explanation: The Controller Manager runs controllers that monitor the state of the cluster and take actions to match the actual state to the desired state (e.g., maintaining the number of replicas of a Deployment).
Question 26
What is the advantage of declarative configuration in Kubernetes?
See explanation
Correct answer: You describe the desired state and Kubernetes ensures it is maintained, even in case of change or failure
Explanation: Declarative configuration (via YAML) allows you to describe what you want, not how to get it. Kubernetes ensures that the actual state always matches the desired state, even after failures or changes.
Question 27
What is the name of Google's internal system that inspired Kubernetes?
See explanation
Correct answer: Borg
Explanation: Borg was Google's internal system that managed millions of containers since 2003. Kubernetes was created in 2014 as an open-source version inspired by Google's experience with Borg.
Question 28
What is the kubectl command to see the details of a Pod?
See explanation
Correct answer: kubectl describe pod
Explanation: kubectl describe pod <name> displays detailed information about a Pod, including its state, events, containers, and resources. It is very useful for debugging.
Question 29
What is the main advantage of Rolling Updates compared to traditional updates?
See explanation
Correct answer: They allow updating an application without service interruption (zero downtime)
Explanation: Rolling Updates always maintain a minimum number of operational Pods during the update. New Pods are created before the old ones are removed, ensuring service continuity.
Question 30
What is the main advantage of Kubernetes for DevOps teams?
See explanation
Correct answer: Automation of many operational tasks, allowing teams to focus on development rather than infrastructure management
Explanation: Kubernetes automates deployment, scaling, failover, load balancing, etc. This frees DevOps teams from repetitive tasks and allows them to focus on adding business value.
Quiz Result
Congratulations on completing the Module 1 quiz!
Score:
- 25-30 correct answers: Excellent! You have a perfect grasp of the fundamental concepts.
- 20-24 correct answers: Very good! You have a good understanding, review the missed questions.
- 15-19 correct answers: Good! Review the chapters where you had difficulties.
- Less than 15: Recommended to review the module before continuing.
Next Steps
Now that you have validated your knowledge:
Module 2: Detailed architecture and Kubernetes components
Practical Labs: Put into practice what you have learned
Quiz created on: December 2024