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
When a Pod is run on a Node, the kubelet adds a set of environment variables
937
-
for each active Service. It adds `{SVCNAME}_SERVICE_HOST` and `{SVCNAME}_SERVICE_PORT` variables, where the Service name is upper-cased and dashes are converted to underscores. It also supports variables (see [makeLinkVariables](https://github.com/kubernetes/kubernetes/blob/dd2d12f6dc0e654c15d5db57a5f9f6ba61192726/pkg/kubelet/envvars/envvars.go#L72)) that are compatible with Docker Engine's "_[legacy container links](https://docs.docker.com/network/links/)_" feature.
937
+
for each active Service. It adds `{SVCNAME}_SERVICE_HOST` and `{SVCNAME}_SERVICE_PORT` variables,
938
+
where the Service name is upper-cased and dashes are converted to underscores.
939
+
It also supports variables (see [makeLinkVariables](https://github.com/kubernetes/kubernetes/blob/dd2d12f6dc0e654c15d5db57a5f9f6ba61192726/pkg/kubelet/envvars/envvars.go#L72))
@@ -1145,7 +1149,10 @@ Kubernetes `ServiceTypes` 允许指定你所需要的 Service 类型。
1145
1149
{{< /note >}}
1146
1150
1147
1151
<!--
1148
-
You can also use [Ingress](/docs/concepts/services-networking/ingress/) to expose your Service. Ingress is not a Service type, but it acts as the entry point for your cluster. It lets you consolidate your routing rules into a single resource as it can expose multiple services under the same IP address.
1152
+
You can also use [Ingress](/docs/concepts/services-networking/ingress/) to expose your Service.
1153
+
Ingress is not a Service type, but it acts as the entry point for your cluster.
1154
+
It lets you consolidate your routing rules into a single resource as it can expose multiple
In the above example, if the Service contained three ports, `80`, `443`, and
1668
1681
`8443`, then `443` and `8443` would use the SSL certificate, but `80` would be proxied HTTP.
1669
1682
1670
-
From Kubernetes v1.9 onwards you can use [predefined AWS SSL policies](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html) with HTTPS or SSL listeners for your Services.
@@ -1777,7 +1792,8 @@ Connection draining for Classic ELBs can be managed with the annotation
1777
1792
`service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled` set
1778
1793
to the value of `"true"`. The annotation
1779
1794
`service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout` can
1780
-
also be used to set maximum time, in seconds, to keep the existing connections open before deregistering the instances.
1795
+
also be used to set maximum time, in seconds, to keep the existing connections open before
1796
+
deregistering the instances.
1781
1797
-->
1782
1798
#### AWS 上的连接排空
1783
1799
@@ -1879,7 +1895,8 @@ To use a Network Load Balancer on AWS, use the annotation `service.beta.kubernet
1879
1895
1880
1896
{{< note >}}
1881
1897
<!--
1882
-
NLB only works with certain instance classes; see the [AWS documentation](http://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-register-targets.html#register-deregister-targets)
1898
+
NLB only works with certain instance classes; see the
on Elastic Load Balancing for a list of supported instance types.
1884
1901
-->
1885
1902
NLB 仅适用于某些实例类。有关受支持的实例类型的列表,
@@ -2066,7 +2083,8 @@ spec:
2066
2083
2067
2084
{{< note >}}
2068
2085
<!--
2069
-
ExternalName accepts an IPv4 address string, but as a DNS name comprised of digits, not as an IP address. ExternalNames that resemble IPv4 addresses are not resolved by CoreDNS or ingress-nginx because ExternalName
2086
+
ExternalName accepts an IPv4 address string, but as a DNS name comprised of digits, not as an IP address.
2087
+
ExternalNames that resemble IPv4 addresses are not resolved by CoreDNS or ingress-nginx because ExternalName
2070
2088
is intended to specify a canonical DNS name. To hardcode an IP address, consider using
2071
2089
[headless Services](#headless-services).
2072
2090
-->
@@ -2091,9 +2109,13 @@ Service's `type`.
2091
2109
2092
2110
{{< warning >}}
2093
2111
<!--
2094
-
You may have trouble using ExternalName for some common protocols, including HTTP and HTTPS. If you use ExternalName then the hostname used by clients inside your cluster is different from the name that the ExternalName references.
2112
+
You may have trouble using ExternalName for some common protocols, including HTTP and HTTPS.
2113
+
If you use ExternalName then the hostname used by clients inside your cluster is different from
2114
+
the name that the ExternalName references.
2095
2115
2096
-
For protocols that use hostnames this difference may lead to errors or unexpected responses. HTTP requests will have a `Host:` header that the origin server does not recognize; TLS servers will not be able to provide a certificate matching the hostname that the client connected to.
2116
+
For protocols that use hostnames this difference may lead to errors or unexpected responses.
2117
+
HTTP requests will have a `Host:` header that the origin server does not recognize;
2118
+
TLS servers will not be able to provide a certificate matching the hostname that the client connected to.
@@ -2219,7 +2241,7 @@ fail with a message indicating an IP address could not be allocated.
2219
2241
In the control plane, a background controller is responsible for creating that
2220
2242
map (needed to support migrating from older versions of Kubernetes that used
2221
2243
in-memory locking). Kubernetes also uses controllers to check for invalid
2222
-
assignments (eg due to administrator intervention) and for cleaning up allocated
2244
+
assignments (e.g. due to administrator intervention) and for cleaning up allocated
2223
2245
IP addresses that are no longer used by any Services.
2224
2246
-->
2225
2247
### 避免冲突 {#avoiding-collisions}
@@ -2374,8 +2396,11 @@ through a load-balancer, though in those cases the client IP does get altered.
2374
2396
#### IPVS
2375
2397
2376
2398
<!--
2377
-
iptables operations slow down dramatically in large scale cluster e.g 10,000 Services.
2378
-
IPVS is designed for load balancing and based on in-kernel hash tables. So you can achieve performance consistency in large number of Services from IPVS-based kube-proxy. Meanwhile, IPVS-based kube-proxy has more sophisticated load balancing algorithms (least conns, locality, weighted, persistence).
2399
+
iptables operations slow down dramatically in large scale cluster e.g. 10,000 Services.
2400
+
IPVS is designed for load balancing and based on in-kernel hash tables.
2401
+
So you can achieve performance consistency in large number of Services from IPVS-based kube-proxy.
2402
+
Meanwhile, IPVS-based kube-proxy has more sophisticated load balancing algorithms
2403
+
(least conns, locality, weighted, persistence).
2379
2404
-->
2380
2405
在大规模集群(例如 10000 个服务)中,iptables 操作会显着降低速度。
2381
2406
IPVS 专为负载均衡而设计,并基于内核内哈希表。
@@ -2386,14 +2411,15 @@ IPVS 专为负载均衡而设计,并基于内核内哈希表。
2386
2411
## API Object
2387
2412
2388
2413
Service is a top-level resource in the Kubernetes REST API. You can find more details
2389
-
about the API object at: [Service API object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#service-v1-core).
2414
+
about the [Service API object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#service-v1-core).
2390
2415
2391
2416
## Supported protocols {#protocol-support}
2392
2417
-->
2393
2418
## API 对象 {#api-object}
2394
2419
2395
-
Service 是 Kubernetes REST API 中的顶级资源。你可以在以下位置找到有关 API 对象的更多详细信息:
0 commit comments