Openshift: Unresolved Image

Viewed 16641

i'm stuck with Openshift (Origin) and need some help.

Let's say i want to add a grafana deployment via CLI to a new started cluster.

What i do:

  1. Upload a template to my openshift cluster (oc create -f openshift-grafana.yml)

  2. Pull the necessary image from the docker hub (oc import-image --confirm grafana/grafana)

  3. Build a new app based on my template (oc new-app grafana)

These steps creates the deployment config and the routes. But then i'm not able to start a deployment via CLI.

# oc deploy grafana                                                                                                                                            
grafana deployment #1 waiting on image or update
# oc rollout latest grafana                                                                                                                                    
Error from server (BadRequest): cannot trigger a deployment for "grafana" because it contains unresolved imagesenter code here

In the openshift web console it looks like this:

The images is there, even the link is working. In the web console i can click "deploy" and it's working. But nevertheless i'm not able to rollout a new version via command line.

The only way it works is editing the deployment yml so openshift recognizes a change a starts a deployment based on "config change" (hint: i'm was not changing the image or image name)

There is nothing special in my template, it was just an export via oc export from a working config.

Any hint would be appreciated, i'm pretty much stuck. Thanks.

4 Answers

For me, I had the image name incorrectly under 'from':

triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
          - alcatraz-ha
        from:
          kind: ImageStreamTag
          name: 'alcatraz-haproxy:latest'
          namespace: alcatraz-ha-dev
      type: ImageChange

I had name: 'alcatraz-ha:latest' so it could not find the image

Make sure that spec.triggers.imageChangeParams.from.name exists as image stream

triggers:
    - imageChangeParams:
        from:
          kind: ImageStreamTag
          name: 'myapp:latest' # Does "myapp" exist if you run oc get is ????!!!
Related