@@ -305,12 +305,12 @@ spec:
305
305
306
306
<!--
307
307
Because this Service has no selector, the corresponding EndpointSlice (and
308
- legacy Endpoints) objects are not created automatically. You can manually map the Service
308
+ legacy Endpoints) objects are not created automatically. You can map the Service
309
309
to the network address and port where it's running, by adding an EndpointSlice
310
310
object manually. For example :
311
311
-->
312
312
由于此服务没有选择算符,因此不会自动创建相应的 EndpointSlice(和旧版 Endpoint)对象。
313
- 你可以通过手动添加 EndpointSlice 对象,将服务手动映射到运行该服务的网络地址和端口 :
313
+ 你可以通过手动添加 EndpointSlice 对象,将服务映射到运行该服务的网络地址和端口 :
314
314
315
315
` ` ` yaml
316
316
apiVersion: discovery.k8s.io/v1
@@ -402,6 +402,18 @@ the EndpointSlice manifest: a TCP connection to 10.1.2.3 or 10.4.5.6, on port 93
402
402
流量被路由到 EndpointSlice 清单中定义的两个端点之一:
403
403
通过 TCP 协议连接到 10.1.2.3 或 10.4.5.6 的端口 9376。
404
404
405
+ {{< note >}}
406
+ <!--
407
+ The Kubernetes API server does not allow proxying to endpoints that are not mapped to
408
+ pods. Actions such as `kubectl proxy <service-name>` where the service has no
409
+ selector will fail due to this constraint. This prevents the Kubernetes API server
410
+ from being used as a proxy to endpoints the caller may not be authorized to access.
411
+ -->
412
+ Kubernetes API 服务器不允许代理到未被映射至 Pod 上的端点。由于此约束,当 Service
413
+ 没有选择算符时,诸如 `kubectl proxy <service-name>` 之类的操作将会失败。这可以防止
414
+ Kubernetes API 服务器被用作调用者可能无权访问的端点的代理。
415
+ {{< /note >}}
416
+
405
417
<!--
406
418
An ExternalName Service is a special case of Service that does not have
407
419
selectors and uses DNS names instead. For more information, see the
0 commit comments