DevOps Kubernetes & Orchestration 1 — Questions and Answers
Question 1: What is a Kubernetes Pod?
- The smallest deployable unit containing one or more containers (Correct answer)
- A group of worker nodes in a cluster
- A virtual network connecting microservices
- A configuration object storing sensitive data
Correct answer: The smallest deployable unit containing one or more containers
A Pod is the smallest and simplest Kubernetes object, representing one or more containers that share network, storage, and a lifecycle.
Question 2: What does a Kubernetes Deployment object manage?
- Declarative updates and scaling of ReplicaSets and Pods (Correct answer)
- Routing external traffic to services inside the cluster
- Persistent storage volumes for stateful applications
- Cluster-wide configuration and secret management
Correct answer: Declarative updates and scaling of ReplicaSets and Pods
A Deployment manages a ReplicaSet to ensure the desired number of identical Pods are running and handles rolling updates and rollbacks.
Question 3: What is the role of the Kubernetes control plane?
- Managing the overall cluster state, scheduling, and API requests (Correct answer)
- Running application workloads in containers
- Providing persistent storage for stateful applications
- Monitoring container health and restarting failed Pods
Correct answer: Managing the overall cluster state, scheduling, and API requests
The control plane components (API server, etcd, scheduler, controller manager) make global decisions about the cluster and respond to cluster events.
Question 4: What is a Kubernetes Service?
- An abstraction that provides a stable network endpoint to access a set of Pods (Correct answer)
- A background process running inside a Pod
- A batch job that runs to completion
- A persistent storage claim for stateful applications
Correct answer: An abstraction that provides a stable network endpoint to access a set of Pods
A Kubernetes Service provides a stable IP and DNS name that load-balances traffic across matching Pods regardless of their ephemeral IPs.
Question 5: Which Kubernetes object stores configuration data as key-value pairs?
- ConfigMap (Correct answer)
- Secret
- PersistentVolume
- Ingress
Correct answer: ConfigMap
A ConfigMap stores non-confidential configuration data as key-value pairs that can be injected into Pods as environment variables or mounted as files.
Question 6: What command applies a Kubernetes manifest file to a cluster?
- kubectl apply -f manifest.yaml (Correct answer)
- kubectl create -f manifest.yaml
- kubectl run -f manifest.yaml
- kubectl deploy -f manifest.yaml
Correct answer: kubectl apply -f manifest.yaml
`kubectl apply -f` creates or updates Kubernetes resources declaratively based on the desired state in the YAML manifest.
What is a Kubernetes Pod?