Courseiva
Services and NetworkingmediumMultiple ChoiceObjective-mapped

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 typically routes to the ClusterIP, not NodePort.

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

    Why it's wrong here

    Ingress can route to ClusterIP services; NodePort is not required.

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

    Why this is correct

    The Ingress controller forwards traffic to the service's ClusterIP, and endpoints must exist for the service to forward to pods.

  • The Ingress must have an IngressClass annotation.

    Why it's wrong here

    An IngressClass may be required if the cluster has multiple controllers, but it is not strictly mandatory if a default IngressClass exists.

Go deeper

Related to this question

About these practice questions

One of 302 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.