Skip to content

Commit 2495311

Browse files
committed
Update image used for image volume task
1 parent 715b7a5 commit 2495311

File tree

2 files changed

+8
-21
lines changed

2 files changed

+8
-21
lines changed

content/en/docs/tasks/configure-pod-container/image-volumes.md

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff 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-
4640
1. 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

content/en/examples/pods/image-volumes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ spec:
1313
volumes:
1414
- name: volume
1515
image:
16-
reference: quay.io/crio/artifact:v1
16+
reference: alpine
1717
pullPolicy: IfNotPresent

0 commit comments

Comments
 (0)