KCNA Kubernetes Architecture & Components 3 — Questions and Answers
Question 1: Which resource type allows a Kubernetes administrator to define a template for creating multiple identical Pods across nodes?
- Deployment
- DaemonSet (Correct answer)
- StatefulSet
- ReplicaSet
Correct answer: DaemonSet
A DaemonSet ensures that one copy of a Pod runs on all (or selected) nodes, making it ideal for node-level agents like log collectors.
Question 2: What is the purpose of a Kubernetes Namespace?
- To isolate network traffic between pods
- To provide a virtual cluster within a physical cluster for resource and scope isolation (Correct answer)
- To separate container images by team
- To limit CPU and memory at the node level
Correct answer: To provide a virtual cluster within a physical cluster for resource and scope isolation
Namespaces provide a scope for names and allow logical partitioning of cluster resources between multiple users or teams.
Question 3: Which field in a Pod spec determines how kubelet handles a container that crashes?
- livenessProbe
- restartPolicy (Correct answer)
- terminationGracePeriodSeconds
- imagePullPolicy
Correct answer: restartPolicy
The restartPolicy field (Always, OnFailure, or Never) controls whether and how kubelet restarts containers that exit.
Question 4: What happens to a Pod's IP address when the Pod is deleted and recreated by a ReplicaSet?
- The Pod keeps the same IP address
- A new IP address is assigned from the cluster's Pod CIDR (Correct answer)
- The node's IP is used instead
- The Service IP is assigned to the Pod
Correct answer: A new IP address is assigned from the cluster's Pod CIDR
Pods are ephemeral; when a Pod is deleted and a new one is created, the new Pod receives a fresh IP address from the cluster's Pod network CIDR.
Question 5: Which Kubernetes object stores sensitive configuration data such as passwords and API keys?
- ConfigMap
- Secret (Correct answer)
- PersistentVolume
- ServiceAccount
Correct answer: Secret
Secrets store sensitive data in base64-encoded form and can be mounted as volumes or exposed as environment variables, with tighter access controls than ConfigMaps.
Question 6: What is the relationship between a ReplicaSet and a Deployment in Kubernetes?
- A Deployment is a type of ReplicaSet
- A Deployment manages one or more ReplicaSets to enable rolling updates and rollbacks (Correct answer)
- A ReplicaSet manages multiple Deployments
- They are completely independent objects
Correct answer: A Deployment manages one or more ReplicaSets to enable rolling updates and rollbacks
A Deployment creates and owns ReplicaSets, creating a new ReplicaSet during updates and scaling down the old one to enable declarative rolling updates.
Question 7: Which component provides DNS resolution for Services and Pods within a Kubernetes cluster?
- kube-proxy
- CoreDNS (Correct answer)
- kubelet
- etcd
Correct answer: CoreDNS
CoreDNS runs as a cluster add-on and provides DNS-based service discovery, resolving Service names to ClusterIP addresses.
Which resource type allows a Kubernetes administrator to define a template for creating multiple identical Pods across nodes?