What is the purpose of a Service in Kubernetes?

  1. Define resource limits for pods
  2. Control pod scheduling policies
  3. Store persistent data for applications
  4. Expose pods on a network endpoint ✓

Correct answer: Expose pods on a network endpoint

Option D is correct because a Kubernetes Service provides a stable network endpoint (a virtual IP address and DNS name) that abstracts the dynamic set of pods behind it, allowing clients inside or outside the cluster to reach those pods reliably even as pods are created or destroyed. Option A is incorrect because resource limits for pods are defined in the pod specification using the resources field, not in a Service object. Option B is incorrect because pod scheduling policies are controlled by node selectors, affinity rules, taints, and tolerations defined on pods or nodes, not by Services. Option C is incorrect because persistent data storage is handled by PersistentVolume and PersistentVolumeClaim objects, which are entirely separate from Service resources.

Topic: · kubernetes services, networking, pods, cluster networking

Practice Certified Kubernetes Administrator (CKA) Questions Free