0 votes
in Kubernetes K8s by
What are the different types of services in Kubernetes?

2 Answers

0 votes
by

Kubernetes networking and services are a complex topic. You need to understand the needs of your application in order to successfully deploy it on Kubernetes. This means understanding the type of service you want to provide, the size and location of your cluster, and what kind of traffic you expect your application to receive. 

There are four types of services that Kubernetes supports: ClusterIP, NodePort, LoadBalancer, and Ingress. Each has their own set of requirements to enable them for your application, so you must understand which one you need before deploying. 

For example, NodePort allows pods within the same node to communicate with each other without having an IP address assigned. Your Kubernetes cluster must have at least two nodes for this type of network communication to work correctly. Also, NodePort only works when accessed from inside the cluster, as opposed to LoadBalancers or Ingress, which allow external access. Let’s go through each to understand how they work.

0 votes
by

The different types of services that support Kubernetes are as follows: 

  1. Cluster IP: It exposes the services on the cluster's internal IP and makes the services reachable within the cluster only.
  2. Node port: It exposes the services on each node’s IP at the static port.
  3. Load balancer: It provides services externally using a cloud provider’s load balancer. It creates the service to route the external load balancer automatically.
  4. External name: It navigates the service to the contents of the external field by returning the CNAME record by its value.

Related questions

+1 vote
asked May 26, 2021 in Kubernetes K8s by sharadyadav1986
0 votes
asked Jan 10, 2023 in Kubernetes K8s by sharadyadav1986
...