Top 4 Kubernetes Service Types in one diagram. The diagram below...

@alexxubyte
Alex Xu@alexxubyte
49 views Dec 26, 2023 ~1 min read
1
Top 4 Kubernetes Service Types in one diagram.

The diagram below shows 4 ways to expose a Service.

In Kubernetes, a Service is a method for exposing a network application in the cluster. We use a Service to make that set of Pods available on the network so that users can interact with it.

There are 4 types of Kubernetes services: ClusterIP, NodePort, LoadBalancer and ExternalName. The “type” property in the Service's specification determines how the service is exposed to the network.

🔹 ClusterIP
ClusterIP is the default and most common service type. Kubernetes will assign a cluster-internal IP address to ClusterIP service. This makes the service only reachable within the cluster.

🔹 NodePort
This exposes the service outside of the cluster by adding a cluster-wide port on top of ClusterIP. We can request the service by NodeIP:NodePort.

🔹 LoadBalancer
This exposes the Service externally using a cloud provider’s load balancer.

🔹 ExternalName
This maps a Service to a domain name. This is commonly used to create a service within Kubernetes to represent an external database.

--
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/uc5M7CdXXC
Media image
Actions
What You Can Do
  • Export as PDF or Markdown
  • Batch Export to Notion
  • Bookmark & Highlight
  • LinkedIn & Instagram Carousel Maker
Create Free Account

Includes 7-day Premium trial