Introduction to K8s Quiz
Quiz
Question 1 of 25
(0 answered)
Question 1
What is Kubernetes primarily used for?
โ
Correct!
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, networking, and management of containerized applications at scale.
โ
Incorrect
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, networking, and management of containerized applications at scale.
Think about what Kubernetes manages and automates.
Question 2
Kubernetes uses an imperative approach where you specify HOW to achieve your goals rather than WHAT you want.
โ
Correct!
Kubernetes uses a declarative approach where you describe WHAT you want (desired state), not HOW to achieve it. Kubernetes continuously works to match actual state to desired state.
โ
Incorrect
Kubernetes uses a declarative approach where you describe WHAT you want (desired state), not HOW to achieve it. Kubernetes continuously works to match actual state to desired state.
Think about whether you tell Kubernetes the steps to follow or the end result you want.
Question 3
The smallest deployable unit in Kubernetes is called a _____.
โ
Correct!
A pod is the smallest deployable unit in Kubernetes. It can contain one or more containers that share storage and network resources.
โ
Incorrect
A pod is the smallest deployable unit in Kubernetes. It can contain one or more containers that share storage and network resources.
It’s a three-letter word that can also mean a group of whales or dolphins.
Question 4
Which of the following are key characteristics of Kubernetes? (Select all that apply)
โ
Correct!
Kubernetes provides container orchestration, declarative configuration, automation at scale, and self-healing capabilities. It does NOT provide built-in database management - databases run as containerized applications on Kubernetes.
โ
Incorrect
Kubernetes provides container orchestration, declarative configuration, automation at scale, and self-healing capabilities. It does NOT provide built-in database management - databases run as containerized applications on Kubernetes.
Four of these are explicitly mentioned as key characteristics in the introduction.
Question 5
Arrange the steps in the Kubernetes reconciliation loop in the correct order:
Drag to arrange in the correct order
โฎโฎ
Observe actual state (status)
โฎโฎ
Define desired state (spec)
โฎโฎ
Compare desired vs actual state
โฎโฎ
Take action if different
โ
Correct!
The reconciliation loop: 1) You define desired state in spec, 2) Kubernetes observes actual state, 3) Compares them, 4) Takes action if they differ. This runs continuously (~every 30 seconds).
โ
Incorrect
The reconciliation loop: 1) You define desired state in spec, 2) Kubernetes observes actual state, 3) Compares them, 4) Takes action if they differ. This runs continuously (~every 30 seconds).
Question 6
What is the reconciliation loop in Kubernetes and why is it important?
What is the reconciliation loop in Kubernetes and why is it important?
The Reconciliation Loop is Kubernetes’ core control mechanism where controllers continuously compare the desired state (what you want) with the actual state (current reality) and take corrective actions to reconcile any differences.
Controllers watch the cluster state via the API server, detect any drift, and take corrective actions to reconcile the difference.
Why it’s important:
- Enables self-healing: automatically recovers from failures
- Maintains desired state: ensures declared configuration is always enforced
- Runs continuously: checks every ~30 seconds
- Reduces manual intervention: system corrects itself automatically
Did you get it right?
โ
Correct!
โ
Incorrect
Question 7
In the reconciliation loop, if you declare 3 replicas but only 2 are running, what does Kubernetes do?
โ
Correct!
Kubernetes automatically creates a new pod to match the desired state of 3 replicas. This is the self-healing capability - Kubernetes continuously works to maintain your declared desired state.
โ
Incorrect
Kubernetes automatically creates a new pod to match the desired state of 3 replicas. This is the self-healing capability - Kubernetes continuously works to maintain your declared desired state.
Remember that Kubernetes uses a declarative model with self-healing.
Question 8
In Kubernetes, the desired state is specified in the ‘status’ field and actual state is in the ‘spec’ field.
โ
Correct!
This is reversed! The desired state is specified in the ‘spec’ (specification) field, and the actual state is reported in the ‘status’ field. Controllers compare these to reconcile differences.
โ
Incorrect
This is reversed! The desired state is specified in the ‘spec’ (specification) field, and the actual state is reported in the ‘status’ field. Controllers compare these to reconcile differences.
Think about ‘spec’ as specification (what you specify/want) and ‘status’ as the current status.
Question 9
Which problems did organizations face before Kubernetes that it helps solve? (Select all that apply)
โ
Correct!
Kubernetes solves: manual deployment orchestration (no more SSHing into servers), resource inefficiency (better utilization through bin-packing), scaling complexity (easy horizontal scaling), and poor fault tolerance (self-healing). It does NOT solve programming language availability!
โ
Incorrect
Kubernetes solves: manual deployment orchestration (no more SSHing into servers), resource inefficiency (better utilization through bin-packing), scaling complexity (easy horizontal scaling), and poor fault tolerance (self-healing). It does NOT solve programming language availability!
Four of these are infrastructure and operations challenges that Kubernetes addresses.
Question 10
Complete the kubectl command to deploy an application:
Fill in the missing kubectl subcommand
kubectl _____ -f deployment.yamlโ
Correct!
The
kubectl apply command is used to deploy or update resources declaratively. It applies the configuration from the YAML file to your cluster. This is the preferred declarative approach in Kubernetes.โ
Incorrect
The
kubectl apply command is used to deploy or update resources declaratively. It applies the configuration from the YAML file to your cluster. This is the preferred declarative approach in Kubernetes.Question 11
What is ‘bin-packing’ in the context of Kubernetes resource optimization?
โ
Correct!
Bin-packing means efficiently scheduling pods onto nodes to maximize resource utilization while avoiding overloading any node - like fitting items neatly into boxes. Kubernetes intelligently places workloads based on resource requirements.
โ
Incorrect
Bin-packing means efficiently scheduling pods onto nodes to maximize resource utilization while avoiding overloading any node - like fitting items neatly into boxes. Kubernetes intelligently places workloads based on resource requirements.
Think about how you pack items into boxes to use space efficiently.
Question 12
Kubernetes eliminates the need for different configurations across dev, staging, and production environments.
โ
Correct!
False! Kubernetes does NOT eliminate configuration differences across environments. Different configs (like database URLs, resource limits) are still necessary and expected. Kubernetes makes these differences explicit and manageable through ConfigMaps and Secrets.
โ
Incorrect
False! Kubernetes does NOT eliminate configuration differences across environments. Different configs (like database URLs, resource limits) are still necessary and expected. Kubernetes makes these differences explicit and manageable through ConfigMaps and Secrets.
Think about whether dev and prod should use the same database URL and resource limits.
Question 13
Given these two ConfigMaps, what will the LOG_LEVEL environment variable be in the production namespace?
# dev/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
namespace: dev
data:
LOG_LEVEL: "debug"
# prod/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
namespace: prod
data:
LOG_LEVEL: "info"What will this code output?
โ
Correct!
In the prod namespace, the ConfigMap sets LOG_LEVEL to “info”. Each namespace has its own ConfigMap with the same name but different values. The app in prod will use the prod ConfigMap, getting “info” as the log level.
โ
Incorrect
In the prod namespace, the ConfigMap sets LOG_LEVEL to “info”. Each namespace has its own ConfigMap with the same name but different values. The app in prod will use the prod ConfigMap, getting “info” as the log level.
Look at which namespace you’re asking about and what value that namespace’s ConfigMap defines.
Question 14
Kubernetes makes environment-specific configurations explicit through _____ and Secrets.
โ
Correct!
ConfigMaps and Secrets are Kubernetes primitives for managing configuration. ConfigMaps store non-sensitive configuration data, while Secrets store sensitive data like passwords and API keys.
โ
Incorrect
ConfigMaps and Secrets are Kubernetes primitives for managing configuration. ConfigMaps store non-sensitive configuration data, while Secrets store sensitive data like passwords and API keys.
It’s a Kubernetes resource that starts with ‘Config’.
Question 15
Which deployment scenario is Kubernetes BEST suited for?
โ
Correct!
Kubernetes excels at managing microservices with high availability needs. It’s designed for cloud-native applications requiring scaling, self-healing, and complex orchestration. For simple apps (WordPress, static sites), Kubernetes is often overkill.
โ
Incorrect
Kubernetes excels at managing microservices with high availability needs. It’s designed for cloud-native applications requiring scaling, self-healing, and complex orchestration. For simple apps (WordPress, static sites), Kubernetes is often overkill.
Think about which scenario requires the most orchestration, scaling, and automation.
Question 16
What does Kubernetes actually solve? (Select all correct statements)
โ
Correct!
Kubernetes solves: automated deployment orchestration (no manual SSHing), process consistency (same deployment mechanism everywhere), and infrastructure abstraction (portable across clouds). It does NOT eliminate config differences or achieve zero manual intervention.
โ
Incorrect
Kubernetes solves: automated deployment orchestration (no manual SSHing), process consistency (same deployment mechanism everywhere), and infrastructure abstraction (portable across clouds). It does NOT eliminate config differences or achieve zero manual intervention.
Three of these are what Kubernetes DOES solve according to the content.
Question 17
Explain the difference between ‘declarative’ and ‘imperative’ approaches in infrastructure management.
Explain the difference between ‘declarative’ and ‘imperative’ approaches in infrastructure management.
Imperative Approach:
- You specify HOW to achieve something
- Step-by-step commands: ‘Start 3 servers’, ‘Update to version 2.0’
- Like giving directions: ‘Turn left, go 2 blocks, turn right’
Declarative Approach (Kubernetes):
- You specify WHAT you want
- Desired state: ‘I want 3 replicas running’, ‘Desired version: 2.0’
- Like giving a destination: ‘Take me to the airport’
- System figures out HOW to get there
Benefits of Declarative:
- Self-healing: system maintains desired state
- Reproducible: same manifest = same result
- Version controlled: infrastructure as code
Did you get it right?
โ
Correct!
โ
Incorrect
Question 18
Kubernetes provides portability, allowing you to run the same workloads on AWS, GCP, Azure, or on-premises infrastructure.
โ
Correct!
True! One of Kubernetes’ key benefits is portability. The same manifests work across any infrastructure - public cloud (AWS, GCP, Azure), private cloud, or on-premises. This avoids vendor lock-in.
โ
Incorrect
True! One of Kubernetes’ key benefits is portability. The same manifests work across any infrastructure - public cloud (AWS, GCP, Azure), private cloud, or on-premises. This avoids vendor lock-in.
This is one of the key benefits mentioned in the ‘Kubernetes vs Other Solutions’ section.
Question 19
What happens during a rolling update if a new version fails health checks?
โ
Correct!
When new pods fail health checks during a rolling update, Kubernetes pauses the rollout and stops replacing old pods. The old version continues running. Automatic rollback does NOT happen - you must manually run
kubectl rollout undo to roll back to the previous version.โ
Incorrect
When new pods fail health checks during a rolling update, Kubernetes pauses the rollout and stops replacing old pods. The old version continues running. Automatic rollback does NOT happen - you must manually run
kubectl rollout undo to roll back to the previous version.Kubernetes prevents bad deployments from progressing, but doesn’t automatically revert them.
Question 20
Which of the following are key benefits of Kubernetes? (Select all that apply)
โ
Correct!
Kubernetes provides high availability (multi-zone deployments with failover), resource optimization (efficient bin-packing and QoS), operational efficiency (automation and standardization), and portability (runs on any infrastructure). It does NOT provide built-in database replication - databases are deployed as applications.
โ
Incorrect
Kubernetes provides high availability (multi-zone deployments with failover), resource optimization (efficient bin-packing and QoS), operational efficiency (automation and standardization), and portability (runs on any infrastructure). It does NOT provide built-in database replication - databases are deployed as applications.
Four of these are core benefits mentioned in the introduction.
Question 21
Which of these are valid local Kubernetes development options? (Select all that apply)
โ
Correct!
Valid options: minikube (single-node cluster), kind (Kubernetes in Docker), k3s (lightweight Kubernetes). Invalid: ‘kubedocker’ and ‘kubelocal’ are not real Kubernetes tools.
โ
Incorrect
Valid options: minikube (single-node cluster), kind (Kubernetes in Docker), k3s (lightweight Kubernetes). Invalid: ‘kubedocker’ and ‘kubelocal’ are not real Kubernetes tools.
Three of these are real tools mentioned in the ‘Getting Started Paths’ section.
Question 22
A set of machines running Kubernetes is called a _____.
โ
Correct!
A cluster is a set of machines (nodes) running Kubernetes. It consists of at least one control plane and one or more worker nodes that run application workloads.
โ
Incorrect
A cluster is a set of machines (nodes) running Kubernetes. It consists of at least one control plane and one or more worker nodes that run application workloads.
It’s a term used to describe a group of connected computers working together.
Question 23
A ’namespace’ in Kubernetes provides physical isolation by running on separate hardware.
โ
Correct!
False! Namespaces provide virtual (logical) isolation, not physical isolation. Multiple namespaces can run on the same physical hardware. They’re used to organize resources and apply policies, but don’t provide hardware-level separation.
โ
Incorrect
False! Namespaces provide virtual (logical) isolation, not physical isolation. Multiple namespaces can run on the same physical hardware. They’re used to organize resources and apply policies, but don’t provide hardware-level separation.
Think about whether namespaces are about organizing resources or separating hardware.
Question 24
Compared to traditional VMs, containers managed by Kubernetes offer:
โ
Correct!
Containers offer faster startup and better resource efficiency compared to VMs. However, VMs provide stronger isolation. There are trade-offs - neither is ‘always better’. Kubernetes with containers excels at resource efficiency and speed.
โ
Incorrect
Containers offer faster startup and better resource efficiency compared to VMs. However, VMs provide stronger isolation. There are trade-offs - neither is ‘always better’. Kubernetes with containers excels at resource efficiency and speed.
Think about the trade-offs mentioned in ‘Kubernetes vs Traditional VMs’.
Question 25
Complete this statement about Kubernetes’ promise:
Fill in the missing core promise
Kubernetes promises to abstract infrastructure, provide _____, enable scalability, and ensure availability.โ
Correct!
The four core promises of Kubernetes are: 1) Abstract infrastructure, 2) Provide self-healing, 3) Enable scalability, 4) Ensure availability. Self-healing means automatic recovery from failures without manual intervention.
โ
Incorrect
The four core promises of Kubernetes are: 1) Abstract infrastructure, 2) Provide self-healing, 3) Enable scalability, 4) Ensure availability. Self-healing means automatic recovery from failures without manual intervention.
Quiz Results
Score
0/0
Accuracy
0%
Right
0
Wrong
Skipped
0
Last updated on