Skip to content

Commit c357b82

Browse files
authored
Update static-pod.md's default pod-manifest-path (#32931)
* Update static-pod.md kubeadm should be configured to use a pod-manifest-path of `/etc/kubernetes/manifests` by default, so this may be a better suggested directory to use than `/etc/kubelet.d/` * Addressing review comments Addressed review comments, and changed an additional instance of the path that needed to be modified.
1 parent 3504060 commit c357b82

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/en/docs/tasks/configure-pod-container/static-pod.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ For example, this is how to start a simple web server as a static Pod:
6767
ssh my-node1
6868
```
6969

70-
2. Choose a directory, say `/etc/kubelet.d` and place a web server Pod definition there, for example `/etc/kubelet.d/static-web.yaml`:
70+
2. Choose a directory, say `/etc/kubernetes/manifests` and place a web server Pod definition there, for example `/etc/kubernetes/manifests/static-web.yaml`:
7171

7272
```shell
7373
# Run this command on the node where kubelet is running
74-
mkdir /etc/kubelet.d/
75-
cat <<EOF >/etc/kubelet.d/static-web.yaml
74+
mkdir -p /etc/kubernetes/manifests/
75+
cat <<EOF >/etc/kubernetes/manifests/static-web.yaml
7676
apiVersion: v1
7777
kind: Pod
7878
metadata:
@@ -90,10 +90,10 @@ For example, this is how to start a simple web server as a static Pod:
9090
EOF
9191
```
9292
93-
3. Configure your kubelet on the node to use this directory by running it with `--pod-manifest-path=/etc/kubelet.d/` argument. On Fedora edit `/etc/kubernetes/kubelet` to include this line:
93+
3. Configure your kubelet on the node to use this directory by running it with `--pod-manifest-path=/etc/kubernetes/manifests/` argument. On Fedora edit `/etc/kubernetes/kubelet` to include this line:
9494
9595
```
96-
KUBELET_ARGS="--cluster-dns=10.254.0.10 --cluster-domain=kube.local --pod-manifest-path=/etc/kubelet.d/"
96+
KUBELET_ARGS="--cluster-dns=10.254.0.10 --cluster-domain=kube.local --pod-manifest-path=/etc/kubernetes/manifests/"
9797
```
9898
or add the `staticPodPath: <the directory>` field in the
9999
[kubelet configuration file](/docs/reference/config-api/kubelet-config.v1beta1/).
@@ -224,7 +224,7 @@ CONTAINER IMAGE CREATED STATE
224224
225225
## Dynamic addition and removal of static pods
226226
227-
The running kubelet periodically scans the configured directory (`/etc/kubelet.d` in our example) for changes and adds/removes Pods as files appear/disappear in this directory.
227+
The running kubelet periodically scans the configured directory (`/etc/kubernetes/manifests` in our example) for changes and adds/removes Pods as files appear/disappear in this directory.
228228
229229
```shell
230230
# This assumes you are using filesystem-hosted static Pod configuration

0 commit comments

Comments
 (0)