What Is Headless Service Kubernetes

What is a headless service? A headless service is a service with a service IP but instead of load-balancing it will return the IPs of our associated Pods. This allows us to interact directly with the Pods instead of a proxy. It’s as simple as specifying None for .

Why headless service is used in Kubernetes?

When there is no need of load balancing or single-service IP addresses. … So then you use Headless Service since it does not have an IP. Kubernetes allows clients to discover pod IPs through DNS lookups.

How do you start a headless service?

To create a headless service, add the clusterIP: None parameter value to the service YAML definition. For example, for a group of pods that you want to be a part of the same cluster or service. Name of the headless service. Setting clusterIP variable to None declares a headless service.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest