Skip to content

Commit cd8f21a

Browse files
authored
Merge pull request #35607 from yanrongshi/zh-cn]Sync-static-pod.md
[zh-cn]Update static-pod.md
2 parents 2587225 + 2d13aa7 commit cd8f21a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/zh-cn/docs/tasks/configure-pod-container/static-pod.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ For example, this is how to start a simple web server as a static Pod:
116116
```shell
117117
ssh my-node1
118118
```
119+
119120
<!--
120-
2. Choose a directory, say `/etc/kubelet.d` and place a web server Pod definition there, e.g. `/etc/kubelet.d/static-web.yaml`:
121+
2. Choose a directory, say `/etc/kubernetes/manifests` and place a web server Pod definition there, for example `/etc/kubernetes/manifests/static-web.yaml`:
121122
122123
```shell
123124
# Run this command on the node where kubelet is running
@@ -271,7 +272,7 @@ already be running.
271272
272273
You can view running containers (including static Pods) by running (on the node):
273274
```shell
274-
# Run this command on the node where kubelet is running
275+
# Run this command on the node where the kubelet is running
275276
crictl ps
276277
```
277278
@@ -324,8 +325,7 @@ static-web 1/1 Running 0 2m
324325
325326
{{< note >}}
326327
<!--
327-
Make sure the kubelet has permission to create the mirror Pod in the API server. If not, the creation request is rejected by the API server. See
328-
[Pod Security admission](/docs/concepts/security/pod-security-admission) and [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/).
328+
Make sure the kubelet has permission to create the mirror Pod in the API server. If not, the creation request is rejected by the API server. See [Pod Security admission](/docs/concepts/security/pod-security-admission) and [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/).
329329
-->
330330
要确保 kubelet 在 API 服务上有创建镜像 Pod 的权限。如果没有,创建请求会被 API 服务拒绝。
331331
参阅 [Pod 安全性准入](/zh-cn/docs/concepts/security/pod-security-admission/)和
@@ -423,11 +423,11 @@ crictl ps
423423
```shell
424424
# 这里假定你在用主机文件系统上的静态 Pod 配置文件
425425
# 在 kubelet 运行的节点上执行以下命令
426-
mv /etc/kubelet.d/static-web.yaml /tmp
426+
mv /etc/kubernetes/manifests/static-web.yaml /tmp
427427
sleep 20
428428
crictl ps
429429
# 可以看到没有 nginx 容器在运行
430-
mv /tmp/static-web.yaml /etc/kubelet.d/
430+
mv /tmp/static-web.yaml /etc/kubernetes/manifests/
431431
sleep 20
432432
crictl ps
433433
```

0 commit comments

Comments
 (0)