You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/concepts/services-networking/service.md
+50-62Lines changed: 50 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,6 @@ spec:
175
175
targetPort: http-web-svc
176
176
```
177
177
178
-
179
178
This works even if there is a mixture of Pods in the Service using a single
180
179
configured name, with the same network protocol available via different
181
180
port numbers. This offers a lot of flexibility for deploying and evolving
@@ -269,7 +268,8 @@ as a destination.
269
268
{{< /note >}}
270
269
271
270
For an EndpointSlice that you create yourself, or in your own code,
272
-
you should also pick a value to use for the [`endpointslice.kubernetes.io/managed-by`](/docs/reference/labels-annotations-taints/#endpointslicekubernetesiomanaged-by) label.
field of the [kube-proxy configuration file](/docs/reference/config-api/kube-proxy-config.v1alpha1/)
546
545
to particular IP block(s).
547
546
548
547
This flag takes a comma-delimited list of IP blocks (e.g. `10.0.0.0/8`, `192.0.2.0/25`)
@@ -556,7 +555,8 @@ This means that kube-proxy should consider all available network interfaces for
556
555
{{< note >}}
557
556
This Service is visible as `<NodeIP>:spec.ports[*].nodePort` and `.spec.clusterIP:spec.ports[*].port`.
558
557
If the `--nodeport-addresses` flag for kube-proxy or the equivalent field
559
-
in the kube-proxy configuration file is set, `<NodeIP>` would be a filtered node IP address (or possibly IP addresses).
558
+
in the kube-proxy configuration file is set, `<NodeIP>` would be a filtered
559
+
node IP address (or possibly IP addresses).
560
560
{{< /note >}}
561
561
562
562
### `type: LoadBalancer` {#loadbalancer}
@@ -610,7 +610,8 @@ set is ignored.
610
610
{{< note >}}
611
611
The`.spec.loadBalancerIP` field for a Service was deprecated in Kubernetes v1.24.
612
612
613
-
This field was under-specified and its meaning varies across implementations. It also cannot support dual-stack networking. This field may be removed in a future API version.
613
+
This field was under-specified and its meaning varies across implementations.
614
+
It also cannot support dual-stack networking. This field may be removed in a future API version.
614
615
615
616
If you're integrating with a provider that supports specifying the load balancer IP address(es)
616
617
for a Service via a (provider specific) annotation, you should switch to doing that.
@@ -684,117 +685,97 @@ depending on the cloud service provider you're using:
Services of type ExternalName map a Service to a DNS name, not to a typical selector such as
799
780
`my-service`or `cassandra`. You specify these Services with the `spec.externalName` parameter.
800
781
@@ -813,11 +794,14 @@ spec:
813
794
```
814
795
815
796
{{< note >}}
816
-
A Service of `type: ExternalName` accepts an IPv4 address string, but treats that string as a DNS name comprised of digits,
817
-
not as an IP address (the internet does not however allow such names in DNS). Services with external names that resemble IPv4
797
+
A Service of `type: ExternalName` accepts an IPv4 address string,
798
+
but treats that string as a DNS name comprised of digits,
799
+
not as an IP address (the internet does not however allow such names in DNS).
800
+
Services with external names that resemble IPv4
818
801
addresses are not resolved by DNS servers.
819
802
820
-
If you want to map a Service directly to a specific IP address, consider using [headless Services](#headless-services).
803
+
If you want to map a Service directly to a specific IP address, consider using
804
+
[headless Services](#headless-services).
821
805
{{< /note >}}
822
806
823
807
When looking up the host `my-service.prod.svc.cluster.local`, the cluster DNS Service
@@ -883,7 +867,8 @@ finding a Service: environment variables and DNS.
883
867
When a Pod is run on a Node, the kubelet adds a set of environment variables
884
868
for each active Service. It adds `{SVCNAME}_SERVICE_HOST` and `{SVCNAME}_SERVICE_PORT` variables,
885
869
where the Service name is upper-cased and dashes are converted to underscores.
886
-
It also supports variables (see [makeLinkVariables](https://github.com/kubernetes/kubernetes/blob/dd2d12f6dc0e654c15d5db57a5f9f6ba61192726/pkg/kubelet/envvars/envvars.go#L72))
870
+
It also supports variables
871
+
(see [makeLinkVariables](https://github.com/kubernetes/kubernetes/blob/dd2d12f6dc0e654c15d5db57a5f9f6ba61192726/pkg/kubelet/envvars/envvars.go#L72))
0 commit comments