Quiz Module 1 - 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. Answers are hidden right 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. This is 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 application lifecycle management
Explanation: Kubernetes automates many tasks that would be tedious to do manually: deployment, restart on failure, scaling based on 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. Worker Nodes run the applications (Pods).
Question 5
Which Control Plane component 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 deployment unit.
Question 7
What is the main role of a Deployment in Kubernetes?
See explanation
Correct answer: Manage the Pod lifecycle, 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 enables rolling updates and rollbacks.
Question 8
Which Service type exposes an application on a port of each cluster node?
See explanation
Correct answer: NodePort
Explanation: A NodePort Service exposes the application on a specific port (30000-32767) of each cluster node, 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 had been managing millions of containers since 2003. Kubernetes is the open-source version of that 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 to not be locked into a single provider and easily migrate your applications.
Question 11
Which Control Plane component is the entry point for all cluster interactions?
See explanation
Correct answer: API Server
Explanation: The API Server is the only component with which users and other cluster components 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 watches for 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 for interacting with Kubernetes?
See explanation
Correct answer: kubectl
Explanation: kubectl (pronounced "kube-control") is the official command-line tool for interacting with a Kubernetes cluster. It allows creating, modifying, deleting, and inspecting resources.
Question 15
What is self-healing in Kubernetes?
See explanation
Correct answer: Kubernetes' ability to automatically restart crashing containers 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 Service type 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 cluster IP, accessible only from within the cluster. It is ideal for inter-service communication.
Question 17
Which component runs on each Worker Node and manages 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 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 progressively replaces old Pods with new ones, without service interruption
Explanation: Rolling Updates allow updating an application without downtime. Kubernetes progressively creates new Pods with the new version and removes 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 adoption by the entire industry. 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 adaptation of the number of Pods based on 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 network rules that enable communication with Services. It provides load balancing and traffic routing to backend Pods.
Question 22
Which tool creates 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 creates 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. This 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 microservice architectures by automating the deployment of each service, independent scaling, service discovery, and communication between them.
Question 25
Which Control Plane component makes decisions about the desired state of the cluster?
See explanation
Correct answer: Controller Manager
Explanation: The Controller Manager runs controllers that monitor the cluster state and take actions to match the actual state to the desired state (for example, 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 achieve 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 view 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 over 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, guaranteeing service continuity.
Question 30
What is the main advantage of Kubernetes for DevOps teams?
See explanation
Correct answer: Automating many operational tasks, allowing teams to focus on development rather than infrastructure management
Explanation: Kubernetes automates deployment, scaling, failure recovery, load balancing, etc. This frees DevOps teams from repetitive tasks and allows them to focus on adding business value.
Quiz Results
Congratulations on completing the Module 1 quiz!
Score:
- 25-30 correct answers: Excellent! You have perfectly mastered 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
Hands-on Labs: Put into practice what you have learned
Quiz created: December 2024