Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 18 of 85
Free Preview · 85 of 282 · questions 1–85 of 282 are free. Sign up free to sync your progress across devices.
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
A headless service is typically used in Kubernetes for workloads that require direct access to individual pods without load balancing.
Headless services are not typically required for the other workload types listed: CronJob: Executes Jobs at a scheduled time, but doesn't necessarily require a headless service. Deployment: Manages stateless applications and can use a standard service for load balancing. DaemonSet: Ensures that a copy of a pod runs on each node in the cluster, but doesn't require a headless service for normal operation.
A. StatefulSet Explanation: StatefulSets are used for applications that maintain a persistent state or have a unique identity, such as databases. Each pod in a StatefulSet typically has a unique name, and it's necessary to ensure discovery and communication between these pods consistently, even when they are scaled up or down. An analogy for StatefulSets could be managing a team of employees in an organization. Each employee has a unique name and a specific role. Even as the team grows or shrinks, it's important to maintain consistent communication among them. Therefore, you need a communication system (service) that can reliably locate each employee, regardless of changes in the team.