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.
A.
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#:~:text=StatefulSets%20currently%20require%20a%20Headless%20Service%20to%20be%20responsible%20for%20the%20network%20identity%20of%20the%20Pods.%20You%20are%20responsible%20for%20creating%20this%20Service.
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
dadaarce
3 months, 2 weeks agophcunha
3 months, 2 weeks agopulsefire
4 months ago