Certified Kubernetes Application Developer (CKAD) Practice Test

Question: 1 / 400

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

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

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.

Get further explanation with Examzify DeepDiveBeta

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

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

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy