[zh-cn] services-networking/service.md
Signed-off-by: Gao Qian <gaoq.jy@fujitsu.com>pull/39179/head
parent
c106300cd4
commit
15fa01502c
|
@ -804,6 +804,8 @@ Kubernetes `ServiceTypes` 允许指定你所需要的 Service 类型。
|
||||||
* `ClusterIP`: Exposes the Service on a cluster-internal IP. Choosing this value
|
* `ClusterIP`: Exposes the Service on a cluster-internal IP. Choosing this value
|
||||||
makes the Service only reachable from within the cluster. This is the
|
makes the Service only reachable from within the cluster. This is the
|
||||||
default that is used if you don't explicitly specify a `type` for a Service.
|
default that is used if you don't explicitly specify a `type` for a Service.
|
||||||
|
You can expose the service to the public with an [Ingress](docs/reference/kubernetes-api/service-resources/ingress-v1/) or the
|
||||||
|
[Gateway API](https://gateway-api.sigs.k8s.io/).
|
||||||
* [`NodePort`](#type-nodeport): Exposes the Service on each Node's IP at a static port
|
* [`NodePort`](#type-nodeport): Exposes the Service on each Node's IP at a static port
|
||||||
(the `NodePort`).
|
(the `NodePort`).
|
||||||
To make the node port available, Kubernetes sets up a cluster IP address,
|
To make the node port available, Kubernetes sets up a cluster IP address,
|
||||||
|
@ -816,6 +818,8 @@ Kubernetes `ServiceTypes` 允许指定你所需要的 Service 类型。
|
||||||
-->
|
-->
|
||||||
* `ClusterIP`:通过集群的内部 IP 暴露服务,选择该值时服务只能够在集群内部访问。
|
* `ClusterIP`:通过集群的内部 IP 暴露服务,选择该值时服务只能够在集群内部访问。
|
||||||
这也是你没有为服务显式指定 `type` 时使用的默认值。
|
这也是你没有为服务显式指定 `type` 时使用的默认值。
|
||||||
|
你可以使用 [Ingress](/zh-cn/docs/reference/kubernetes-api/service-resources/ingress-v1/)
|
||||||
|
或者 [Gateway API](https://gateway-api.sigs.k8s.io/) 向公众暴露服务。
|
||||||
* [`NodePort`](#type-nodeport):通过每个节点上的 IP 和静态端口(`NodePort`)暴露服务。
|
* [`NodePort`](#type-nodeport):通过每个节点上的 IP 和静态端口(`NodePort`)暴露服务。
|
||||||
为了让节点端口可用,Kubernetes 设置了集群 IP 地址,这等同于你请求 `type: ClusterIP` 的服务。
|
为了让节点端口可用,Kubernetes 设置了集群 IP 地址,这等同于你请求 `type: ClusterIP` 的服务。
|
||||||
* [`LoadBalancer`](#loadbalancer):使用云提供商的负载均衡器向外部暴露服务。
|
* [`LoadBalancer`](#loadbalancer):使用云提供商的负载均衡器向外部暴露服务。
|
||||||
|
|
Loading…
Reference in New Issue