CKA Services and Networking Practice Question
You need to expose a service named 'my-svc' on a static port 30080 on every node. Which service type should you use?
⚠ Common exam trap
Watch out — candidates often confuse NodePort with LoadBalancer, thinking LoadBalancer is required for external access, but NodePort alone suffices for exposing a static port on every node without cloud dependencies.
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
✓
NodePort
NodePort is the correct service type because it exposes the service on a static port (30080) on every node's IP address. When you create a NodePort service, Kubernetes allocates a port from the range 30000-32767 (by default) and opens that port on all nodes, forwarding traffic to the service's ClusterIP and then to the pods. This allows external access to the service via any node's IP and the specified NodePort.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
LoadBalancer
Why it's wrong here
While a LoadBalancer service automatically allocates a NodePort and provisions an external cloud load balancer, it is an over-engineered solution for simply exposing a service on a static port. Using it introduces unnecessary cloud provider dependencies and costs when the requirement is strictly to expose the service on a static, cluster-wide port.
- ✓
NodePort
Why this is correct
NodePort is the correct service type because it reserves a static port from a default range (30000-32767) across all cluster nodes. This allows external clients to access the service by targeting any node's IP address combined with the designated static port, satisfying the requirement directly without external dependencies.
- ✗
ExternalName
Why it's wrong here
ExternalName does not expose internal cluster workloads on a static port or route traffic to pods using selectors. Instead, it acts as a local alias that returns a CNAME record pointing to an external DNS name, making it entirely unsuitable for exposing an internal service.
- ✗
ClusterIP
Why it's wrong here
ClusterIP is the default service type that exposes the service on an internal, cluster-only IP address. Because this IP is not routable from outside the Kubernetes cluster, it cannot be used to expose the service on a static port accessible to external clients.
Go deeper
Related to this question
Learn chapter
Kubernetes Architecture Overview
Key term
ClusterIP NodePort LoadBalancer
ClusterIP, NodePort, and LoadBalancer are three types of Kubernetes Services that control how traffic reaches your application pods inside the cluster or from outside.
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
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 →
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.