Update basic-stateful-set.md (#18952)
This commit is contained in:
@@ -223,7 +223,7 @@ Each Pod has a stable hostname based on its ordinal index. Use
|
||||
|
||||
### 使用稳定的网络身份标识
|
||||
|
||||
每个 Pod 都拥有一个基于其顺序索引的稳定的主机名。使用[`kubectl exec`](/docs/user-guide/kubectl/{{< param "version" >}}/#exec)在每个 Pod 中执行`hostname`。
|
||||
每个 Pod 都拥有一个基于其顺序索引的稳定的主机名。使用[`kubectl exec`](/docs/reference/generated/kubectl/kubectl-commands/#exec)在每个 Pod 中执行`hostname`。
|
||||
|
||||
```shell
|
||||
for i in 0 1; do kubectl exec web-$i -- sh -c 'hostname'; done
|
||||
|
||||
Reference in New Issue
Block a user