I would like to know the tag applied to all the images in a namespace. Is there any oc command to view tags in a namespace?
Before posting this question, i googled. However i didn't find any. So I am posting this question here.
I would like to know the tag applied to all the images in a namespace. Is there any oc command to view tags in a namespace?
Before posting this question, i googled. However i didn't find any. So I am posting this question here.
You may get details from imagestreamtag object. If you need formatted tags only as a list you can execute this command.
oc get imagestreams imagename -o jsonpath='{range .status.tags[*]}{.tag}{"\n"}'
This will return something like this as result as formatted:
20.10.321
20.13.328
20.14.333
20.14.338
20.16.342
imagename
, but is there a way to do this for all the images in the namespace? That is, all the images in a project? I tried the command omitting the imagename
, but there was no output. I know there are tags for the images in my project (at least latest
) because I see them if I use the command oc get imagestreams
. –
Sestet © 2022 - 2024 — McMap. All rights reserved.
oc describe is
. This will list tags for each image stream along with lots of other information. Add an extra argument of a specific image stream to be selective. – Arianoc get is python -n openshift --template='{{.metadata.name}}{{range .spec.tags}}{{" "}}{{.name}}{{end}}{{"\n"}}'
. This will outputpython 2.7 3.3 3.4 3.5 3.6 latest
. – Arian{{.created}}
with no luck :( – Koahimagestreamtag
objects instead if need more detail that not in theimagestream
object. Useoc get imagestreamtag imagename:tagname -o json
and see if details are in there. – Arian