Update basic-stateful-set.md (#18952)

This commit is contained in:
wwgfhf
2020-02-02 19:23:21 +08:00
committed by GitHub
parent cd001dcedd
commit 966f070523
@@ -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