@@ -273,32 +273,33 @@ Services provide load balancing across a set of pods. There are several common p
273273not work properly. The following instructions should help debug Service problems.
274274
275275First, verify that there are endpoints for the service. For every Service object,
276- the apiserver makes an `endpoints` resource available.
276+ the apiserver makes one or more `EndpointSlice` resources available.
277277
278- You can view this resource with:
278+ You can view these resource with:
279279-->
280280### 调试 Service {#debugging-services}
281281
282282服务支持在多个 Pod 间负载均衡。
283283有一些常见的问题可以造成服务无法正常工作。
284284以下说明将有助于调试服务的问题。
285285
286- 首先,验证服务是否有端点。对于每一个 Service 对象,API 服务器为其提供对应的
287- ` endpoints ` 资源。
286+ 首先,验证服务是否有端点。对于每一个 Service 对象,API 服务器为其提供对应的一个或多个
287+ ` EndpointSlice ` 资源。
288288
289- 通过如下命令可以查看 endpoints 资源:
289+ 通过如下命令可以查看 ` EndpointSlice ` 资源:
290290
291291``` shell
292- kubectl get endpoints ${SERVICE_NAME}
292+ kubectl get endpointslices -l kubernetes.io/service-name=${SERVICE_NAME}
293+
293294```
294295
295296<!--
296- Make sure that the endpoints match up with the number of pods that you expect to be members of your service.
297+ Make sure that the endpoints in the EndpointSlices match up with the number of pods that you expect to be members of your service.
297298For example, if your Service is for an nginx container with 3 replicas, you would expect to see three different
298- IP addresses in the Service's endpoints.
299+ IP addresses in the Service's endpoints slices .
299300-->
300- 确保 Endpoints 与服务成员 Pod 个数一致 。
301- 例如,如果你的 Service 用来运行 3 个副本的 nginx 容器,你应该会在 Service 的 Endpoints
301+ 确保 EndpointSlices 中的端点与你期望成为服务成员的 Pod 数量相匹配 。
302+ 例如,如果你的 Service 用来运行 3 个副本的 nginx 容器,你应该会在 Service 的 EndpointSlices
302303中看到 3 个不同的 IP 地址。
303304
304305<!--
0 commit comments