OpenShift Image and ImageStream Operations

From NovaOrdis Knowledge Base
Revision as of 19:58, 27 November 2017 by Ovidiu (talk | contribs) (→‎Internal)
Jump to navigation Jump to search

Internal

Overview

Get Image Streams Available to a Project

oc project <project-name>
oc get imagestreams
oc get is
oc get is -n openshift

Get Information about an Image Stream

oc describe is jboss-eap64-openshift

Create an Image Stream

The following procedure will create a image stream named "" in the "openshift" project.

An example of image stream definition file is available at https://raw.githubusercontent.com/jboss-openshift/application-templates/master/jboss-image-streams.json. A version is also available here: OpenShift JBoss ImageStream Definition Example.

oc login -u system:admin
oc create -f ./jboss-image-streams.json -n openshift

The output is similar to:

imagestream "jboss-webserver31-tomcat7-openshift" created
imagestream "jboss-webserver31-tomcat8-openshift" created
imagestream "jboss-eap71-openshift" created
imagestream "jboss-decisionserver64-openshift" created
imagestream "jboss-processserver64-openshift" created
imagestream "jboss-datagrid71-openshift" created
imagestream "jboss-datagrid65-client-openshift" created
imagestream "jboss-datagrid71-client-openshift" created
imagestream "jboss-datavirt63-driver-openshift" created
imagestream "jboss-amq-63" created
imagestream "redhat-sso71-openshift" created
Error from server (AlreadyExists): imagestreams "jboss-webserver30-tomcat7-openshift" already exists
Error from server (AlreadyExists): imagestreams "jboss-webserver30-tomcat8-openshift" already exists
Error from server (AlreadyExists): imagestreams "jboss-eap64-openshift" already exists
Error from server (AlreadyExists): imagestreams "jboss-eap70-openshift" already exists 
Error from server (AlreadyExists): imagestreams "jboss-decisionserver62-openshift" already exists
Error from server (AlreadyExists): imagestreams "jboss-decisionserver63-openshift" already exists
Error from server (AlreadyExists): imagestreams "jboss-processserver63-openshift" already exists
Error from server (AlreadyExists): imagestreams "jboss-datagrid65-openshift" already exists
Error from server (AlreadyExists): imagestreams "jboss-datavirt63-openshift" already exists
Error from server (AlreadyExists): imagestreams "jboss-amq-62" already exists
Error from server (AlreadyExists): imagestreams "redhat-sso70-openshift" already exists
Error from server (AlreadyExists): imagestreams "redhat-openjdk18-openshift" already exists

Import an Image Stream from Repository

oc import-image local-redhat-openjdk-18/openjdk18-openshift --from=registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift --confirm