File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
concepts/services-networking
reference/labels-annotations-taints Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -855,9 +855,19 @@ You can use a headless Service to interface with other service discovery mechani
855
855
without being tied to Kubernetes' implementation.
856
856
857
857
For headless Services, a cluster IP is not allocated, kube-proxy does not handle
858
- these Services, and there is no load balancing or proxying done by the platform
859
- for them. How DNS is automatically configured depends on whether the Service has
860
- selectors defined :
858
+ these Services, and there is no load balancing or proxying done by the platform for them.
859
+
860
+ A headless Service allows a client to connect to whichever Pod it prefers, directly. Services that are headless don't
861
+ configure routes and packet forwarding using
862
+ [virtual IP addresses and proxies](/docs/reference/networking/virtual-ips/); instead, headless Services report the
863
+ endpoint IP addresses of the individual pods via internal DNS records, served through the cluster's
864
+ [DNS service](/docs/concepts/services-networking/dns-pod-service/).
865
+ To define a headless Service, you make a Service with `.spec.type` set to ClusterIP (which is also the default for `type`),
866
+ and you additionally set `.spec.clusterIP` to None.
867
+
868
+ The string value None is a special case and is not the same as leaving the `.spec.clusterIP` field unset.
869
+
870
+ How DNS is automatically configured depends on whether the Service has selectors defined :
861
871
862
872
# ## With selectors
863
873
Original file line number Diff line number Diff line change @@ -1001,9 +1001,10 @@ Type: Label
1001
1001
1002
1002
Example: ` service.kubernetes.io/headless: "" `
1003
1003
1004
- Used on: Service
1004
+ Used on: Endpoints
1005
1005
1006
1006
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 ) .
1007
1008
1008
1009
### service.kubernetes.io/topology-aware-hints (deprecated) {#servicekubernetesiotopology-aware-hints}
1009
1010
You can’t perform that action at this time.
0 commit comments