Courseiva
Services and Networking →mediumMultiple Select

CKAD Services and Networking Practice Question

Which TWO statements about Kubernetes Services are correct? (Choose two.)

⚠ Common exam trap

It's easy for candidates to assume Services require a cluster IP or can only use named ports, but the CKAD exam tests knowledge of headless Services and the flexibility of port definitions.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

A Service provides a stable endpoint for a set of pods.

A Kubernetes Service provides a stable virtual IP and DNS name that remains constant even as the underlying pods are created, destroyed, or rescheduled. This decouples clients from the ephemeral nature of pod IPs, ensuring reliable connectivity to the pod group.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Services can only route traffic based on named ports.

    Why it's wrong here

    Kubernetes Services accept both numeric port numbers and named ports in their port definitions. Named ports are a convenience that lets you reference a port by a symbolic name, but the Service ultimately resolves to a concrete TCP/UDP number; there is no restriction that only named ports can be used. In fact, the vast majority of Services define ports numerically, so this statement is false.

  • ✓

    A Service provides a stable endpoint for a set of pods.

    Why this is correct

    A Service provides a stable virtual IP address and a corresponding DNS name that remain constant even as the underlying Pods are scaled, rescheduled, or replaced. Because Pod IPs are ephemeral by nature, clients can rely on the Service address as the durable network endpoint for a logical application, and traffic is load-balanced across the current set of Pods. This stable endpoint is the primary reason Services are used for inter-Pod communication.

  • ✓

    A Service uses label selectors to identify the target pods.

    Why this is correct

    The Service spec contains a `selector` field — a map of key-value pairs that must match Pod labels for a Pod to be included as an Endpoint. The endpoint controller continuously monitors Pods in the Service's namespace and updates the Service's Endpoints object with the IPs of all Pods whose labels exactly match the selector. This label-based membership is what lets a Service group the appropriate set of Pods without knowing their IPs in advance.

  • ✗

    Services can only route traffic to pods in the same namespace.

    Why it's wrong here

    A Service object lives in a single namespace and its label selector is evaluated only against Pods in that same namespace; you cannot use a selector to target Pods from another namespace. However, this does not mean the Service's traffic routing is permanently confined to same-namespace Pods — you can manually create an Endpoints object (or use an ExternalName Service) to point to arbitrary IPs or DNS names, including Pods in other namespaces or external systems. Thus the categorical 'only' in the statement is incorrect.

  • ✗

    Every Service must have a cluster IP assigned.

    Why it's wrong here

    The only field truly required in a Service's IP configuration is optional: when `clusterIP` is set to `None`, Kubernetes creates a headless Service that has no virtual ClusterIP and does not perform load balancing or proxying. For headless Services, DNS lookup returns the IP addresses of the backing Pods directly, which is useful for stateful workloads that need identifying each Pod instance. Consequently, a ClusterIP assignment is not mandatory for every Service.

About these practice questions

This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.