Skip to content

Commit ad9b3ca

Browse files
authored
Merge pull request #9 from mohuani/main
[pod] fix: change nginx to nginx-pod in doc.
2 parents 8cb7f5c + cd7a7ed commit ad9b3ca

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,15 @@ kubectl port-forward nginx-pod 4000:80
302302
我们可以通过 `logs` 或者 `logs -f` 命令查看 pod 日志,可以通过 `exec -it` 进入 pod 或者调用容器命令,通过 `delete pod` 或者 `delete -f nginx.yaml` 的方式删除 pod 资源。这里可以看到 [kubectl 所有命令](https://kubernetes.io/docs/reference/kubectl/cheatsheet/)。
303303

304304
```shell
305-
kubectl logs --follow nginx
305+
kubectl logs --follow nginx-pod
306306
                              
307-
kubectl exec nginx -- ls
307+
kubectl exec nginx-pod -- ls
308308
309-
kubectl delete pod nginx
310-
# pod "nginx" deleted
309+
kubectl delete pod nginx-pod
310+
# pod "nginx-pod" deleted
311311
312312
kubectl delete -f nginx.yaml
313-
# pod "nginx" deleted
313+
# pod "nginx-pod" deleted
314314
```
315315

316316
最后,根据我们在 `container` 的那节构建的 `hellok8s:v1` 的镜像,同时参考 `nginx` pod 的资源定义,你能独自编写出 `hellok8s:v1` Pod 的资源文件吗。并通过 `port-forward` 到本地的 `3000` 端口进行访问,最终得到字符串 `[v1] Hello, Kubernetes!`。

0 commit comments

Comments
 (0)