You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/images-cluster-sample-imagestream-import.adoc
+18-9Lines changed: 18 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,21 +13,21 @@ You can ensure that you always have access to the latest versions of the Cluster
13
13
+
14
14
[source,terminal]
15
15
----
16
-
oc get imagestreams -nopenshift
16
+
oc get imagestreams -n openshift
17
17
----
18
18
19
19
. Fetch the tags for every imagestream in the `openshift` namespace by running the following command:
20
20
+
21
21
[source,terminal]
22
22
----
23
-
$ oc get is <image-stream-name> -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -nopenshift
23
+
$ oc get is <image-stream-name> -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -n openshift
24
24
----
25
25
+
26
26
For example:
27
27
+
28
28
[source,terminal]
29
29
----
30
-
$ oc get is ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -nopenshift
30
+
$ oc get is ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -n openshift
31
31
----
32
32
+
33
33
.Example output
@@ -41,31 +41,40 @@ $ oc get is ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.fro
41
41
+
42
42
[source,terminal]
43
43
----
44
-
$ oc tag <repository/image> <image-stream-name:tag> --scheduled -nopenshift
44
+
$ oc tag <repository/image> <image-stream-name:tag> --scheduled -n openshift
45
45
----
46
46
+
47
47
For example:
48
48
+
49
49
[source,terminal]
50
50
----
51
-
$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.11 ubi8-openjdk-17:1.11 --scheduled -nopenshift
52
-
$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.12 ubi8-openjdk-17:1.12 --scheduled -nopenshift
51
+
$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.11 ubi8-openjdk-17:1.11 --scheduled -n openshift
53
52
----
54
53
+
55
-
This command causes {product-title} to periodically update this particular image stream tag. This period is a cluster-wide setting set to 15 minutes by default.
54
+
[source,terminal]
55
+
----
56
+
$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.12 ubi8-openjdk-17:1.12 --scheduled -n openshift
57
+
----
58
+
+
59
+
[NOTE]
60
+
====
61
+
Using the `--scheduled` flag is recommended to periodically re-import an image when working with an external container image registry. The `--scheduled` flag helps to ensure that you receive the latest versions and security updates. Additionally, this setting allows the import process to automatically retry if a temporary error initially prevents the image from being imported.
62
+
63
+
By default, scheduled image imports occur every 15 minutes cluster-wide.
64
+
====
56
65
57
66
. Verify the scheduling status of the periodic import by running the following command:
58
67
+
59
68
[source,terminal]
60
69
----
61
-
oc get imagestream <image-stream-name> -o jsonpath="{range .spec.tags[*]}Tag: {.name}{'\t'}Scheduled: {.importPolicy.scheduled}{'\n'}{end}" -nopenshift
0 commit comments