Skip to content

Commit 35d3460

Browse files
paul-rogersk8s-ci-robot
authored andcommitted
Update downward-api-volume-expose-pod-information.md (#7771)
* Update downward-api-volume-expose-pod-information.md The pod spec puts the downward api files into /etc/podinfo, not directly in /etc. Updated docs to reflect this fact. * Update downward-api-volume-expose-pod-information.md One more spot needed fixing. * Update downward-api-volume-expose-pod-information.md Yet another fix, in the container example.
1 parent 86a525d commit 35d3460

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/tasks/inject-data-application/downward-api-volume-expose-pod-information.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Here is the configuration file for the Pod:
3737
{% include code.html language="yaml" file="dapi-volume.yaml" ghlink="/docs/tasks/inject-data-application/dapi-volume.yaml" %}
3838

3939
In the configuration file, you can see that the Pod has a `downwardAPI` Volume,
40-
and the Container mounts the Volume at `/etc`.
40+
and the Container mounts the Volume at `/etc/podinfo`.
4141

4242
Look at the `items` array under `downwardAPI`. Each element of the array is a
4343
[DownwardAPIVolumeFile](/docs/api-reference/{{page.version}}/#downwardapivolumefile-v1-core).
@@ -88,7 +88,7 @@ kubectl exec -it kubernetes-downwardapi-volume-example -- sh
8888
In your shell, view the `labels` file:
8989

9090
```shell
91-
/# cat /etc/labels
91+
/# cat /etc/podinfo/labels
9292
```
9393

9494
The output shows that all of the Pod's labels have been written
@@ -103,19 +103,19 @@ zone="us-est-coast"
103103
Similarly, view the `annotations` file:
104104

105105
```shell
106-
/# cat /etc/annotations
106+
/# cat /etc/podinfo/annotations
107107
```
108108

109-
View the files in the `/etc` directory:
109+
View the files in the `/etc/podinfo` directory:
110110

111111
```shell
112-
/# ls -laR /etc
112+
/# ls -laR /etc/podinfo
113113
```
114114

115115
In the output, you can see that the `labels` and `annotations` files
116116
are in a temporary subdirectory: in this example,
117-
`..2982_06_02_21_47_53.299460680`. In the `/etc` directory, `..data` is
118-
a symbolic link to the temporary subdirectory. Also in the `/etc` directory,
117+
`..2982_06_02_21_47_53.299460680`. In the `/etc/podinfo` directory, `..data` is
118+
a symbolic link to the temporary subdirectory. Also in the `/etc/podinfo` directory,
119119
`labels` and `annotations` are symbolic links.
120120

121121
```
@@ -155,7 +155,7 @@ file for a Pod that has one Container:
155155
{% include code.html language="yaml" file="dapi-volume-resources.yaml" ghlink="/docs/tasks/inject-data-application/dapi-volume-resources.yaml" %}
156156

157157
In the configuration file, you can see that the Pod has a `downwardAPI` Volume,
158-
and the Container mounts the Volume at `/etc`.
158+
and the Container mounts the Volume at `/etc/podinfo`.
159159

160160
Look at the `items` array under `downwardAPI`. Each element of the array is a
161161
DownwardAPIVolumeFile.
@@ -179,7 +179,7 @@ kubectl exec -it kubernetes-downwardapi-volume-example-2 -- sh
179179
In your shell, view the `cpu_limit` file:
180180

181181
```shell
182-
/# cat /etc/cpu_limit
182+
/# cat /etc/podinfo/cpu_limit
183183
```
184184
You can use similar commands to view the `cpu_request`, `mem_limit` and
185185
`mem_request` files.

0 commit comments

Comments
 (0)