KCNA practice question 24 of 25

How many different Kubernetes service types can you define?

Full set: 240 questions
Answer options
A: 2
B: 3
C: 4 Correct answer
D: 5
Correct Answer:
C. 4
Explanation

Kubernetes defines four distinct service types to control how a set of Pods is exposed as a network service. These types are specified in the spec.type field of the Service manifest. The four types are: ClusterIP (default, internal exposure), NodePort (exposes the service on each node's IP at a static port), LoadBalancer (exposes the service externally using a cloud provider's load balancer), and ExternalName (maps the service to a CNAME record). Each type serves a different networking purpose, from internal-only communication to external access.

Why Incorrect

A. This is incorrect; there are more than two service types available in Kubernetes.
B. This is incorrect; it omits one of the four standard service types.
D. This is incorrect; Kubernetes currently defines only four service types.

References

1. Kubernetes Documentation. (n.d.). Service. Kubernetes. Retrieved from https://kubernetes.io/docs/concepts/services-networking/service/. (See the "Publishing Services (ServiceTypes)" section, which lists and describes all four types).

3. Beyer, B., Jones, C., Petoff, J., & Murphy, N. R. (2016). Site Reliability Engineering. O'Reilly Media. Chapter 19, "Running SRE," discusses Kubernetes networking primitives, including the different service types.

Scroll to Top