Skip to content

Commit

Permalink
sync configure-persistent-volume-storage static-pod
Browse files Browse the repository at this point in the history
Update static-pod.md
  • Loading branch information
asa3311 committed Jan 7, 2024
1 parent f5e1703 commit 27cfd83
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ PersistentVolumeClaim requests to this PersistentVolume.
[StorageClass 的名称](/zh-cn/docs/concepts/storage/persistent-volumes/#class)`manual`
它将用于将 PersistentVolumeClaim 的请求绑定到此 PersistentVolume。

{{< note >}}
<!--
This example uses the `ReadWriteOnce` access mode, for simplicity. For
production use, the Kubernetes project recommends using the `ReadWriteOncePod`
access mode instead.
-->
为了简化,本示例采用了 `ReadWriteOnce` 访问模式。然而对于生产环境,
Kubernetes 项目建议改用 `ReadWriteOncePod` 访问模式。
{{< /note >}}

<!--
Create the PersistentVolume:
-->
Expand Down
27 changes: 12 additions & 15 deletions content/zh-cn/docs/tasks/configure-pod-container/static-pod.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,24 +161,21 @@ For example, this is how to start a simple web server as a static Pod:
```
<!--
1. Configure your kubelet on the node to use this directory by running it with
1. Configure the kubelet on that node to set a `staticPodPath` value in the
[kubelet configuration file](/docs/reference/config-api/kubelet-config.v1beta1/).
See [Set Kubelet Parameters Via A Configuration File](/docs/tasks/administer-cluster/kubelet-config-file/)
for more information.
An alternative and deprecated method is to configure the kubelet on that node
to look for static Pod manifests locally, using a command line argument.
To use the deprecated approach, start the kubelet with the
`--pod-manifest-path=/etc/kubernetes/manifests/` argument.
On Fedora, edit `/etc/kubernetes/kubelet` to include this line:
-->
3. 配置这个节点上的 kubelet,使用这个参数执行 `--pod-manifest-path=/etc/kubernetes/manifests/`
在 Fedora 上编辑 `/etc/kubernetes/kubelet` 以包含下面这行:
```
KUBELET_ARGS="--cluster-dns=10.254.0.10 --cluster-domain=kube.local --pod-manifest-path=/etc/kubernetes/manifests/"
```
<!--
or add the `staticPodPath: <the directory>` field in the
[kubelet configuration file](/docs/reference/config-api/kubelet-config.v1beta1/).
-->
或者在 [Kubelet 配置文件](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)中添加
`staticPodPath: <目录>`字段。
3. 在该节点上配置 kubelet,在 [kubelet 配置文件](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)中设定 `staticPodPath` 值。
欲了解更多信息,请参考[通过配置文件设定 kubelet 参数](/zh-cn/docs/tasks/administer-cluster/kubelet-config-file/)。
另一个已弃用的方法是,在该节点上通过命令行参数配置 kubelet,以便从本地查找静态 Pod 清单。
若使用这种弃用的方法,请启动 kubelet 时加上 `--pod-manifest-path=/etc/kubernetes/manifests/` 参数。
<!--
1. Restart the kubelet. On Fedora, you would run:
Expand Down

0 comments on commit 27cfd83

Please sign in to comment.