File tree Expand file tree Collapse file tree 2 files changed +8
-21
lines changed
docs/tasks/configure-pod-container Expand file tree Collapse file tree 2 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -37,34 +37,21 @@ to a valid reference and consuming it in the `volumeMounts` of the container. Fo
3737 kubectl apply -f https://k8s.io/examples/pods/image-volumes.yaml
3838 ```
3939
40- 1 . Attach to the container:
41-
42- ``` shell
43- kubectl attach -it image-volume bash
44- ```
45-
46401 . Check the content of a file in the volume:
4741
4842 ``` shell
49- cat /volume/dir/file
50- ```
51-
52- The output is similar to:
53-
54- ``` none
55- 1
56- ```
57-
58- You can also check another file in a different path:
59-
60- ``` shell
61- cat /volume/file
43+ kubectl exec image-volume -- cat /volume/etc/os-release
6244 ```
6345
6446 The output is similar to:
6547
6648 ``` none
67- 2
49+ NAME="Alpine Linux"
50+ ID=alpine
51+ VERSION_ID=3.21.3
52+ PRETTY_NAME="Alpine Linux v3.21"
53+ HOME_URL="https://alpinelinux.org/"
54+ BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
6855 ```
6956
7057## Further reading
Original file line number Diff line number Diff line change 1313 volumes :
1414 - name : volume
1515 image :
16- reference : quay.io/crio/artifact:v1
16+ reference : alpine
1717 pullPolicy : IfNotPresent
You can’t perform that action at this time.
0 commit comments