KCNA practice question 20 of 25

A Kubernetes _____ is an abstraction that defines a logical set of Pods and a policy by which to access them.

Full set: 240 questions
Answer options
A: Selector
B: Controller
C: Service Correct answer
D: Job
Correct Answer:
C. Service
Explanation

This question provides the official definition of a Kubernetes Service. A Service is an API object that provides a stable network endpoint for a set of Pods. It uses a label selector to dynamically find the Pods that provide a certain function and exposes them through a single, consistent IP address or DNS name. This decouples clients from the ephemeral nature of individual Pods, which can be created, destroyed, or replaced without affecting the application's accessibility. The Service defines the policy (e.g., port, protocol) for accessing this logical group of Pods.

Why Incorrect

A: A Selector is a mechanism used by objects like Services to identify a set of Pods, but it is not the abstraction that provides access. B: A Controller (e.g., Deployment) is responsible for managing the state and lifecycle of Pods, not for defining network access to them. D: A Job is a workload object designed to run a finite task to completion; it does not provide a persistent network access point.

References

1. Kubernetes Documentation, "Service". The introductory paragraph states: "An abstract way to expose an application running on a set of Pods as a network service. With Kubernetes you don't need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them." The concept page further clarifies it defines a logical set of Pods and a policy. Retrieved from: https://kubernetes.io/docs/concepts/services-networking/service/

2. The University of British Columbia, CPSC 416: Distributed Systems, "Kubernetes Tutorial 2: Services". The courseware defines a Service as "an abstraction that describes a logical set of pods and a policy for accessing them." Retrieved from: https://www.cs.ubc.ca/~bestchai/teaching/cs4162017w2/assign2/tutorial/kubernetes-tutorial-services.html

Scroll to Top