Fix the path to dapi-volume.yaml and update the example to reflect
the current statepull/590/head
parent
94aaca027b
commit
cfaf885568
|
@ -17,7 +17,7 @@ This example assumes you have a Kubernetes cluster installed and running, and th
|
||||||
|
|
||||||
### Step One: Create the pod
|
### Step One: Create the pod
|
||||||
|
|
||||||
Use the `docs/user-guide/downward-api/dapi-volume.yaml` file to create a Pod with a downward API volume which stores pod labels and pod annotations to `/etc/labels` and `/etc/annotations` respectively.
|
Use the [dapi-volume.yaml](/docs/user-guide/downward-api/volume/dapi-volume.yaml) file to create a Pod with a downward API volume which stores pod labels and pod annotations to `/etc/labels` and `/etc/annotations` respectively.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl create -f docs/user-guide/downward-api/volume/dapi-volume.yaml
|
$ kubectl create -f docs/user-guide/downward-api/volume/dapi-volume.yaml
|
||||||
|
@ -46,21 +46,21 @@ In pod's `/etc` directory one may find the file created by the plugin (system fi
|
||||||
$ kubectl exec kubernetes-downwardapi-volume-example -i -t -- sh
|
$ kubectl exec kubernetes-downwardapi-volume-example -i -t -- sh
|
||||||
/ # ls -laR /etc
|
/ # ls -laR /etc
|
||||||
/etc:
|
/etc:
|
||||||
total 32
|
total 4
|
||||||
drwxrwxrwt 3 0 0 180 Aug 24 13:03 .
|
drwxrwxrwt 3 0 0 120 Jun 1 19:55 .
|
||||||
drwxr-xr-x 1 0 0 4096 Aug 24 13:05 ..
|
drwxr-xr-x 17 0 0 4096 Jun 1 19:55 ..
|
||||||
drwx------ 2 0 0 80 Aug 24 13:03 ..2015_08_24_13_03_44259413923
|
drwxr-xr-x 2 0 0 80 Jun 1 19:55 ..6986_01_06_15_55_10.473583074
|
||||||
lrwxrwxrwx 1 0 0 30 Aug 24 13:03 ..downwardapi -> ..2015_08_24_13_03_44259413923
|
lrwxrwxrwx 1 0 0 31 Jun 1 19:55 ..data -> ..6986_01_06_15_55_10.473583074
|
||||||
lrwxrwxrwx 1 0 0 25 Aug 24 13:03 annotations -> ..downwardapi/annotations
|
lrwxrwxrwx 1 0 0 18 Jun 1 19:55 annotations -> ..data/annotations
|
||||||
lrwxrwxrwx 1 0 0 20 Aug 24 13:03 labels -> ..downwardapi/labels
|
lrwxrwxrwx 1 0 0 13 Jun 1 19:55 labels -> ..data/labels
|
||||||
|
|
||||||
/etc/..2015_08_24_13_03_44259413923:
|
/etc/..6986_01_06_15_55_10.473583074:
|
||||||
total 8
|
total 8
|
||||||
drwx------ 2 0 0 80 Aug 24 13:03 .
|
drwxr-xr-x 2 0 0 80 Jun 1 19:55 .
|
||||||
drwxrwxrwt 3 0 0 180 Aug 24 13:03 ..
|
drwxrwxrwt 3 0 0 120 Jun 1 19:55 ..
|
||||||
-rw-r--r-- 1 0 0 115 Aug 24 13:03 annotations
|
-rw-r--r-- 1 0 0 129 Jun 1 19:55 annotations
|
||||||
-rw-r--r-- 1 0 0 53 Aug 24 13:03 labels
|
-rw-r--r-- 1 0 0 59 Jun 1 19:55 labels
|
||||||
/ #
|
/ #
|
||||||
```
|
```
|
||||||
|
|
||||||
The file `labels` is stored in a temporary directory (`..2015_08_24_13_03_44259413923` in the example above) which is symlinked to by `..downwardapi`. Symlinks for annotations and labels in `/etc` point to files containing the actual metadata through the `..downwardapi` indirection. This structure allows for dynamic atomic refresh of the metadata: updates are written to a new temporary directory, and the `..downwardapi` symlink is updated atomically using `rename(2)`.
|
The file `labels` is stored in a temporary directory (`..6986_01_06_15_55_10.473583074` in the example above) which is symlinked to by `..data`. Symlinks for annotations and labels in `/etc` point to files containing the actual metadata through the `..data` indirection. This structure allows for dynamic atomic refresh of the metadata: updates are written to a new temporary directory, and the `..data` symlink is updated atomically using `rename(2)`.
|
||||||
|
|
Loading…
Reference in New Issue