@@ -390,7 +390,6 @@ Visually:
390
390
用图表示:
391
391
{{< figure src="/zh-cn/docs/images/tutor-service-nodePort-fig02.svg" alt="图 2:源 IP NodePort" class="diagram-large" caption="如图。源 IP(Type=NodePort)保存客户端源 IP 地址" link="" >}}
392
392
393
-
394
393
<!--
395
394
## Source IP for Services with `Type=LoadBalancer`
396
395
@@ -510,7 +509,7 @@ serving the health check at `/healthz`. You can test this:
510
509
路径上提供健康检查的节点的端口。你可以这样测试:
511
510
512
511
` ` ` shell
513
- kubectl get pod -o wide -l run =source-ip-app
512
+ kubectl get pod -o wide -l app =source-ip-app
514
513
` ` `
515
514
<!--
516
515
The output is similar to this :
@@ -611,8 +610,8 @@ the `service.spec.healthCheckNodePort` field on the Service.
611
610
-->
612
611
第一类负载均衡器必须使用负载均衡器和后端之间商定的协议来传达真实的客户端 IP,
613
612
例如 HTTP [ 转发] ( https://tools.ietf.org/html/rfc7239#section-5.2 ) 或
614
- [ X-FORWARDED-FOR] ( https://en .wikipedia.org/wiki/X-Forwarded-For )
615
- 表头 ,或[ 代理协议] ( https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt ) 。
613
+ [ X-FORWARDED-FOR] ( https://zh .wikipedia.org/wiki/X-Forwarded-For )
614
+ 标头 ,或[ 代理协议] ( https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt ) 。
616
615
第二类负载均衡器可以通过创建指向存储在 Service 上的 ` service.spec.healthCheckNodePort `
617
616
字段中的端口的 HTTP 健康检查来利用上述功能。
618
617
@@ -623,17 +622,17 @@ Delete the Services:
623
622
-->
624
623
删除 Service:
625
624
626
- ``` console
627
- $ kubectl delete svc -l app=source-ip-app
625
+ ``` shell
626
+ kubectl delete svc -l app=source-ip-app
628
627
```
629
628
630
629
<!--
631
630
Delete the Deployment, ReplicaSet and Pod:
632
631
-->
633
632
删除 Deployment、ReplicaSet 和 Pod:
634
633
635
- ``` console
636
- $ kubectl delete deployment source-ip-app
634
+ ``` shell
635
+ kubectl delete deployment source-ip-app
637
636
```
638
637
639
638
## {{% heading "whatsnext" %}}
0 commit comments