Certified Kubernetes Application Developer (CKAD) Practice Test

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the Certified Kubernetes Application Developer (CKAD) Exam. Gain confidence with flashcards and multiple-choice questions, complete with hints and explanations. Achieve your certification with ease!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


In Kubernetes, what is the main difference between NodePort and ClusterIP services?

  1. NodePort is only for internal traffic, whereas ClusterIP is for external access

  2. NodePort exposes services on each node's IP, while ClusterIP is restricted to internal cluster access

  3. NodePort requires a specific configuration for routing, whereas ClusterIP does not

  4. NodePort can only be used with stateful applications, while ClusterIP is for stateless applications

The correct answer is: NodePort exposes services on each node's IP, while ClusterIP is restricted to internal cluster access

The main distinction between NodePort and ClusterIP services in Kubernetes lies in their accessibility and exposure. NodePort services allow external traffic to access a service by exposing it on a specific port on each node's IP address in the cluster. This means that users can reach the service from outside the cluster using any node's IP address followed by the designated NodePort number. This makes NodePort useful for scenarios where external users need direct access to the service. On the other hand, ClusterIP services are solely intended for internal communication within the cluster. They provide a stable IP address that can be used by other services and pods in the cluster to communicate with the service without exposing it externally. This is beneficial for securing services that do not need to be accessed outside the cluster. Therefore, the reason why the statement regarding NodePort exposing services on each node's IP while ClusterIP is restricted to internal cluster access is correct is because it accurately captures the essential functionality and intent behind these two service types. The NodePort service acts as a bridge between the internal cluster and external traffic, making it more versatile in terms of external accessibility, while ClusterIP maintains internal communication pathways.