Sobes.tech
Junior — Middle

Can you list the main types of services used in Kubernetes and briefly describe their purpose?

sobes.tech AI

Answer from AI

In Kubernetes, the main types of services are:

  • ClusterIP — the service is only accessible within the cluster. Used for internal communication between pods.
  • NodePort — opens a port on each node in the cluster, allowing access to the service from outside through this port.
  • LoadBalancer — creates an external load balancer (if supported by the cloud provider) so that the service is accessible from outside via a single IP.
  • ExternalName — allows the service to refer to an external DNS name, redirecting requests to external resources.

Each type serves different scenarios of access to applications inside and outside the cluster.