CKA Services and Networking Practice Question
You have a service 'my-svc' of type ClusterIP with no selector defined. You manually create an Endpoints object with the same name. Which statement is true?
⚠ Common exam trap
Watch out — candidates often assume a Service always auto-creates an Endpoints object, but the CKA exam tests the specific case where a Service has no selector, requiring manual Endpoints creation.
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 will route traffic to the IPs defined in the Endpoints object.
A Kubernetes Service without a selector relies on a manually created Endpoints object to define the backend targets. The Service's ClusterIP will route traffic to the IP addresses and ports specified in the Endpoints object, as long as the Endpoints object has the same name as the Service and the Service's ports match the Endpoints' ports. This is a common pattern for routing traffic to external resources or services not managed by Kubernetes.
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 service will automatically create an Endpoints object based on the service ports.
Why it's wrong here
When a Kubernetes Service is defined without a label selector, the control plane's endpoint controller does not automatically provision an associated Endpoints resource. Instead, the cluster administrator must manually create and configure the Endpoints object to map the service to specific target IP addresses.
- ✗
The Endpoints object must have the same labels as the service.
Why it's wrong here
Kubernetes binds a Service to an Endpoints object solely based on their matching metadata names, not their labels. As long as the Endpoints resource shares the exact same name and namespace as the selectorless Service, the routing will function correctly regardless of the labels applied to either resource.
- ✓
The service will route traffic to the IPs defined in the Endpoints object.
Why this is correct
For a ClusterIP service without a selector, Kubernetes relies on a manually created Endpoints resource sharing the same name. kube-proxy will configure the data plane (such as iptables or IPVS) to intercept traffic sent to the Service's ClusterIP and route it directly to the target IP addresses and ports defined in that Endpoints object.
- ✗
The service must be of type ExternalName to use manually created Endpoints.
Why it's wrong here
Services of type ExternalName map a service to a DNS name using a CNAME record rather than routing traffic to IP addresses via Endpoints. Manually created Endpoints are specifically used with ClusterIP or NodePort services that lack selectors to route traffic to external or static IP addresses.
Go deeper
Related to this question
Learn chapter
Installing Kubernetes with kubeadm
Key term
Ingress Resources
Ingress Resources are Kubernetes API objects that manage external access to services inside a cluster, typically HTTP and HTTPS traffic, by defining rules for routing requests based on hostnames and paths.
Key term
Network Policies
A Kubernetes resource that controls how pods communicate with each other and with other network endpoints, acting as a firewall for pod-to-pod traffic.
About these practice questions
This CKA question is part of Courseiva's 726-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 →
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.