How many types of services are there in Kubernetes?

Study for the Kubernetes Certified Network Administrator Exam. Our test offers comprehensive flashcards, multiple-choice questions, and detailed explanations. Be confident for your exam!

Multiple Choice

How many types of services are there in Kubernetes?

Explanation:
Service types in Kubernetes determine how a service is exposed and how clients reach it. The standard service types are four: ClusterIP, NodePort, LoadBalancer, and ExternalName. ClusterIP provides a stable internal IP reachable only within the cluster and is the default. NodePort opens a specific port on each node and forwards traffic to the ClusterIP, allowing access from outside the cluster using node IPs and that port. LoadBalancer requests an external load balancer from the cloud provider and assigns an external IP, suitable for public access. ExternalName maps the service to an external DNS name, delegating traffic to an external service via DNS. A related pattern is a headless service, achieved by setting the clusterIP to None, which changes DNS behavior but is not a separate service type. There are four service types in total.

Service types in Kubernetes determine how a service is exposed and how clients reach it. The standard service types are four: ClusterIP, NodePort, LoadBalancer, and ExternalName. ClusterIP provides a stable internal IP reachable only within the cluster and is the default. NodePort opens a specific port on each node and forwards traffic to the ClusterIP, allowing access from outside the cluster using node IPs and that port. LoadBalancer requests an external load balancer from the cloud provider and assigns an external IP, suitable for public access. ExternalName maps the service to an external DNS name, delegating traffic to an external service via DNS. A related pattern is a headless service, achieved by setting the clusterIP to None, which changes DNS behavior but is not a separate service type. There are four service types in total.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy