Courseiva
Services and Networking →mediumMultiple Choice

CKA Services and Networking Practice Question

An Ingress resource is created with the following spec:

spec: rules: - host: example.com http: paths: - path: /api pathType: Prefix backend: service: name: api-service port: number: 80

The backend service 'api-service' is in the same namespace as the Ingress. What must be true for the Ingress to route traffic to the service?

⚠ Common exam trap

Many candidates assume Ingress requires a NodePort or LoadBalancer service type, but in reality, Ingress works with any service type that has a ClusterIP (including ClusterIP, NodePort, and LoadBalancer), and the critical requirement is that the service has a reachable ClusterIP and at least one ready endpoint.

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

✓

The service 'api-service' must have a valid ClusterIP and at least one endpoint.

For an Ingress to route traffic to a backend service, the service must have a valid ClusterIP (so the Ingress controller can reach it via the cluster network) and at least one healthy endpoint (i.e., pods matching the service’s selector must be running and ready). The Ingress controller forwards traffic to the service’s ClusterIP on the specified port, not directly to pods, so a ClusterIP and endpoints are essential.

Answer analysis

Option-by-option breakdown

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

  • ✗

    The Ingress controller must be configured to use the NodePort of the service.

    Why it's wrong here

    Ingress controllers route to the Service's ClusterIP through Endpoints; NodePort is irrelevant to Ingress backends. Referencing a NodePort is chosen when exposing a Service directly on each node without an ingress layer, not for host/path routing.

  • ✗

    The service 'api-service' must be of type NodePort.

    Why it's wrong here

    Ingress backends reference Services by name and port, and ClusterIP Services work; NodePort is not required. NodePort Services are selected when external clients must reach a Service directly via node IP and port without an ingress controller.

  • ✓

    The service 'api-service' must have a valid ClusterIP and at least one endpoint.

    Why this is correct

    Ingress routing resolves the backend through the Service, so the Service needs a valid ClusterIP and at least one ready endpoint. Without endpoints, kube-proxy has no pod to forward to and requests fail, regardless of correct Ingress path and host configuration.

  • ✗

    The Ingress must have an IngressClass annotation.

    Why it's wrong here

    An IngressClass annotation only selects which controller reconciles the resource; it does not create the Service endpoints the rule references. The scenario fails because api-service must exist in the same namespace with a matching port. IngressClass matters when several controllers run and you must bind the Ingress to one.

Go deeper

Related to this question

About these practice questions

One of 726 original CKA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 CKA 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 CKA exam.