Skip to content

Commit 75b8566

Browse files
author
Weiping Cai
committed
fix svc type error
Signed-off-by: Weiping Cai <[email protected]>
1 parent 436afaa commit 75b8566

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

content/en/docs/tutorials/services/source-ip.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ service/nodeport exposed
177177

178178
```shell
179179
NODEPORT=$(kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services nodeport)
180-
NODES=$(kubectl get nodes -o jsonpath='{ $.items[*].status.addresses[?(@.type=="ExternalIP")].address }')
180+
NODES=$(kubectl get nodes -o jsonpath='{ $.items[*].status.addresses[?(@.type=="InternalIP")].address }')
181181
```
182182

183183
If you're running on a cloud provider, you may need to open up a firewall-rule

content/zh/docs/tutorials/services/source-ip.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ service/nodeport exposed
150150

151151
```console
152152
NODEPORT=$(kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services nodeport)
153-
NODES=$(kubectl get nodes -o jsonpath='{ $.items[*].status.addresses[?(@.type=="ExternalIP")].address }')
153+
NODES=$(kubectl get nodes -o jsonpath='{ $.items[*].status.addresses[?(@.type=="InternalIP")].address }')
154154
```
155155

156156
如果你的集群运行在一个云服务上,你可能需要为上面报告的 `nodes:nodeport` 开启一条防火墙规则。

0 commit comments

Comments
 (0)