Courseiva
Kubernetes Fundamentals →hardMultiple Choice

KCNA Kubernetes Fundamentals Practice Question

You create a Service of type NodePort with nodePort: 30080. The cluster's nodes have IP addresses 10.0.0.1 and 10.0.0.2. From outside the cluster, which address and port can you use to access the Service?

⚠ Common exam trap

The KCNA often tests the distinction between ClusterIP (internal-only) and NodePort (external access via nodeIP:nodePort), trapping candidates who confuse the service port (e.g., 80) with the nodePort (e.g., 30080) or think ClusterIP is externally routable.

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

✓

10.0.0.1:30080

A NodePort service exposes the same port (nodePort: 30080) on every node in the cluster. From outside the cluster, you can reach the service using the IP address of any node (e.g., 10.0.0.1) combined with the nodePort (30080). The kube-proxy on that node will forward traffic to the service's ClusterIP and then to the selected pods.

Answer analysis

Option-by-option breakdown

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

  • ✓

    10.0.0.1:30080

    Why this is correct

    NodePort exposes the Service on every node's IP at the allocated static port, so 10.0.0.1:30080 reaches it from outside the cluster. The kube-proxy on each node listens on that port and forwards traffic to the backing Pods, satisfying the external-access constraint without requiring a load balancer or Ingress.

  • ✗

    10.0.0.1:80

    Why it's wrong here

    Port 80 is the Service's internal targetPort, not the nodePort; external clients must use the allocated nodePort 30080. NodePort exposes the Service on every node's IP at that port, so 10.0.0.1:80 reaches nothing. It tempts because 80 is HTTP's default, but NodePort never maps to privileged ports.

  • ✗

    ClusterIP:80

    Why it's wrong here

    ClusterIP is a virtual address reachable only inside the cluster, and it carries no node IP; external clients cannot route to it. NodePort instead binds 30080 on each node's IP. ClusterIP tempts because it is the default Service type, but it provides no external exposure at all.

  • ✗

    10.0.0.2:8080

    Why it's wrong here

    8080 is neither the declared nodePort (30080) nor a port Kubernetes allocates; NodePorts default to the 30000-32767 range. External access requires 10.0.0.2:30080. Port 8080 tempts as a common application port, but the Service's nodePort field fixes the actual listening port.

About these practice questions

Courseiva writes every KCNA question from scratch — 930 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on KCNA

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You want to expose a set of pods running on node port 30080 to external traffic. Which Service type should you use?

medium
  • A.ExternalName
  • B.LoadBalancer
  • ✓ C.NodePort
  • D.ClusterIP

Why C: (NodePort) is correct because a NodePort service exposes the application on a static port (30080) on each node's IP address, making it accessible from outside the cluster via <NodeIP>:30080. This is the appropriate choice when you need to expose pods to external traffic using a specific port number without requiring a cloud load balancer.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This KCNA 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 KCNA exam.