Skip to content

Commit 15f1eee

Browse files
author
tamilselvan1102
committed
Explaination about headless service
1 parent f089d6d commit 15f1eee

File tree

2 files changed

+12
-1
lines changed
  • content/en/docs

2 files changed

+12
-1
lines changed

content/en/docs/concepts/services-networking/service.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,16 @@ these Services, and there is no load balancing or proxying done by the platform
859859
for them. How DNS is automatically configured depends on whether the Service has
860860
selectors defined:
861861

862+
A headless Service allows a client to connect to whichever Pod it prefers, directly. Services that are headless don't
863+
configure routes and packet forwarding using
864+
[virtual IP addresses and proxies](/docs/reference/networking/virtual-ips/); instead, headless Services report the
865+
endpoint IP addresses of the individual pods via internal DNS records, served through the cluster's
866+
[DNS service](/docs/concepts/services-networking/dns-pod-service/).
867+
To define a headless Service, you make a Service with `.spec.type` set to ClusterIP (which is also the default for `type`),
868+
and you additionally set `.spec.clusterIP` to None.
869+
870+
The string value None is a special case and is not the same as leaving the `.spec.clusterIP` field unset.
871+
862872
### With selectors
863873

864874
For headless Services that define selectors, the endpoints controller creates

content/en/docs/reference/labels-annotations-taints/_index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,9 +1001,10 @@ Type: Label
10011001

10021002
Example: `service.kubernetes.io/headless: ""`
10031003

1004-
Used on: Service
1004+
Used on: Endpoints
10051005

10061006
The control plane adds this label to an Endpoints object when the owning Service is headless.
1007+
To learn more, read [Headless Services](/docs/concepts/services-networking/service/#headless-services).
10071008

10081009
### service.kubernetes.io/topology-aware-hints (deprecated) {#servicekubernetesiotopology-aware-hints}
10091010

0 commit comments

Comments
 (0)